Adding a test for double escaped form urls.

Refs #1748
This commit is contained in:
Mark Story 2011-06-23 14:05:50 -07:00
parent de893b14ab
commit f3f0363df3

View file

@ -5829,7 +5829,28 @@ class FormHelperTest extends CakeTestCase {
'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);
}
/**