mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
adding extra test, disproves ticket [#2233 state:works-for-me]
This commit is contained in:
parent
e8e2bbc4d7
commit
cfbc6d4989
1 changed files with 18 additions and 0 deletions
|
@ -1924,6 +1924,24 @@ class FormHelperTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->input('Contact.field', array(
|
||||
'type' => 'text', 'error' => array('attributes' => array('class' => 'error'))
|
||||
));
|
||||
$expected = array(
|
||||
'div' => array('class' => 'input text error'),
|
||||
'label' => array('for' => 'ContactField'),
|
||||
'Field',
|
||||
'/label',
|
||||
'input' => array(
|
||||
'type' => 'text', 'name' => 'data[Contact][field]',
|
||||
'id' => 'ContactField', 'class' => 'form-error'
|
||||
),
|
||||
array('div' => array('class' => 'error')),
|
||||
'Badness!',
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->input('Contact.field', array(
|
||||
'div' => array('tag' => 'span'), 'error' => array('attributes' => array('wrap' => false))
|
||||
));
|
||||
|
|
Loading…
Add table
Reference in a new issue