mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
added test to disprove #3588
This commit is contained in:
parent
ee08fe5c1f
commit
fa1d22dc5e
1 changed files with 23 additions and 0 deletions
|
@ -7417,6 +7417,29 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->input('Contact.boolean_field', array('type' => 'checkbox', 'required' => true));
|
||||
$expected = array(
|
||||
'div' => array('class' => 'input checkbox required'),
|
||||
array('input' => array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'data[Contact][boolean_field]',
|
||||
'id' => 'ContactBooleanField_',
|
||||
'value' => '0'
|
||||
)),
|
||||
array('input' => array(
|
||||
'type' => 'checkbox',
|
||||
'name' => 'data[Contact][boolean_field]',
|
||||
'value' => '1',
|
||||
'id' => 'ContactBooleanField',
|
||||
'required' => 'required'
|
||||
)),
|
||||
'label' => array('for' => 'ContactBooleanField'),
|
||||
'Boolean Field',
|
||||
'/label',
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue