From 68378f2d0640e8528053f3881b69498f86919163 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Thu, 23 Jun 2011 14:05:50 -0700 Subject: [PATCH] Adding a test for double escaped form urls. Refs #1748 --- .../Test/Case/View/Helper/FormHelperTest.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 605cdceac..12ad5d6b5 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -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); } /**