mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding test to form helper to increase code coverage.
This commit is contained in:
parent
d302ed1bfa
commit
8d407ac915
1 changed files with 15 additions and 0 deletions
|
@ -4633,6 +4633,21 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/fieldset'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$this->Form->data = array();
|
||||
$this->Form->params['controller'] = 'contacts';
|
||||
$this->Form->params['models'] = array('Contact');
|
||||
$result = $this->Form->create(array('url' => array('action' => 'index', 'param')));
|
||||
$expected = array(
|
||||
'form' => array(
|
||||
'id' => 'ContactAddForm', 'method' => 'post', 'action' => '/contacts/index/param'
|
||||
),
|
||||
'fieldset' => array('style' => 'preg:/display\s*\:\s*none;\s*/'),
|
||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||
'/fieldset'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
}
|
||||
/**
|
||||
* Test base form url when url param is passed with multiple parameters (&)
|
||||
|
|
Loading…
Add table
Reference in a new issue