Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a test for double escaped form urls.

Refs #1748
  • Loading branch information...
commit f3f0363df3d70ef5173f06fd9a80bea4d4df87c7 1 parent de893b1
@markstory markstory authored
Showing with 22 additions and 1 deletion.
  1. +22 −1 cake/tests/cases/libs/view/helpers/form.test.php
View
23 cake/tests/cases/libs/view/helpers/form.test.php
@@ -5829,7 +5829,28 @@ function testCreateQuerystringParams() {
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
'/div'
);
- $this->assertTags($result, $expected, true);
+ $this->assertTags($result, $expected);
+
+ $result = $this->Form->create('Contact', array(
+ 'type' => 'post',
+ 'url' => array(
+ 'controller' => 'controller',
+ 'action' => 'action',
+ '?' => array('param1' => 'value1', 'param2' => 'value2')
+ )
+ ));
+ $expected = array(
+ 'form' => array(
+ 'id' => 'ContactAddForm',
+ 'method' => 'post',
+ 'action' => '/controller/action?param1=value1&param2=value2',
+ 'accept-charset' => $encoding
+ ),
+ 'div' => array('style' => 'display:none;'),
+ 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
+ '/div'
+ );
+ $this->assertTags($result, $expected);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.