Allow 3.x backport of url=>false in 2.x

This commit is contained in:
Mark Scherer 2016-01-07 10:48:20 +01:00
parent 6fbc029b9b
commit b1f1003ebe
3 changed files with 33 additions and 3 deletions

View file

@ -8608,6 +8608,26 @@ class FormHelperTest extends CakeTestCase {
}
/**
* Test create() with no URL (no "action" attribute for <form> 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->assertTags($result, $expected);
}
/**
* Test the onsubmit option for create()
*
* @return void