mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
add test to prove #2723
This commit is contained in:
parent
47558e8db5
commit
7df6477526
1 changed files with 13 additions and 1 deletions
|
@ -6575,7 +6575,12 @@ class FormHelperTest extends CakeTestCase {
|
|||
*/
|
||||
public function testCreateWithInputDefaults() {
|
||||
$this->Form->create('User', array(
|
||||
'inputDefaults' => array('div' => false, 'label' => false)
|
||||
'inputDefaults' => array(
|
||||
'div' => false,
|
||||
'label' => false,
|
||||
'error' => array('attributes' => array('wrap' => 'small', 'class' => 'error')),
|
||||
'format' => array('before', 'label', 'between', 'input', 'after', 'error')
|
||||
)
|
||||
));
|
||||
$result = $this->Form->input('username');
|
||||
$expected = array(
|
||||
|
@ -6591,6 +6596,13 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->input('username', array('label' => 'Username', 'format' => array('input', 'label')));
|
||||
$expected = array(
|
||||
'input' => array('type' => 'text', 'name' => 'data[User][username]', 'id' => 'UserUsername'),
|
||||
'label' => array('for' => 'UserUsername'), 'Username', '/label',
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue