diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index e43966d4db8..d8baf977e2b 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -8598,7 +8598,28 @@ public function testCreate() { $this->assertTags($result, $expected); } + /** + * Test create() with no URL (no "action" attribute for
tag) + * + * @return void + */ + public function testCreateNoUrl() { + $result = $this->Form->create(false, array('url' => false)); + $expected = array( + 'form' => array( + 'id' => 'addForm', + 'method' => 'post', + 'accept-charset' => strtolower(Configure::read('App.encoding')) + ), + 'div' => array('style' => 'display:none;'), + 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), + '/div' + ); + $this->assertHtml($expected, $result); + } + + /** * Test the onsubmit option for create() * * @return void