mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 13:02:40 +00:00
add test to show label options in inputDefaults
This commit is contained in:
parent
5c590aad09
commit
8c631fa022
1 changed files with 15 additions and 0 deletions
|
@ -6603,6 +6603,21 @@ class FormHelperTest extends CakeTestCase {
|
||||||
'label' => array('for' => 'UserUsername'), 'Username', '/label',
|
'label' => array('for' => 'UserUsername'), 'Username', '/label',
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $expected);
|
$this->assertTags($result, $expected);
|
||||||
|
|
||||||
|
$this->Form->create('User', array(
|
||||||
|
'inputDefaults' => array(
|
||||||
|
'div' => false,
|
||||||
|
'label' => array('class' => 'nice', 'for' => 'changed'),
|
||||||
|
)
|
||||||
|
));
|
||||||
|
$result = $this->Form->input('username', array('div' => true));
|
||||||
|
$expected = array(
|
||||||
|
'div' => array('class' => 'input text'),
|
||||||
|
'label' => array('for' => 'changed', 'class' => 'nice'), 'Username', '/label',
|
||||||
|
'input' => array('type' => 'text', 'name' => 'data[User][username]', 'id' => 'UserUsername'),
|
||||||
|
'/div'
|
||||||
|
);
|
||||||
|
$this->assertTags($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue