Add missing test that is present in 3.x.

This commit is contained in:
Mark Scherer 2016-01-04 14:29:00 +01:00
parent a2ce6c8c1f
commit 7076e6d481

View file

@ -8598,7 +8598,28 @@ class FormHelperTest extends CakeTestCase {
$this->assertTags($result, $expected);
}
/**
* 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->assertHtml($expected, $result);
}
/**
* Test the onsubmit option for create()
*
* @return void