mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Add missing test that is present in 3.x.
This commit is contained in:
parent
a2ce6c8c1f
commit
7076e6d481
1 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue