mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +00:00
Allow 3.x backport of url=>false
in 2.x
This commit is contained in:
parent
6fbc029b9b
commit
b1f1003ebe
3 changed files with 33 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue