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 55387ef77f
commit 68378f2d06

View file

@ -6165,6 +6165,27 @@ class FormHelperTest extends CakeTestCase {
'/div'
);
$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);
}
/**