add test to show label options in inputDefaults

This commit is contained in:
Ceeram 2012-04-05 17:46:47 +02:00
parent 5c590aad09
commit 8c631fa022

View file

@ -6603,6 +6603,21 @@ class FormHelperTest extends CakeTestCase {
'label' => array('for' => 'UserUsername'), 'Username', '/label',
);
$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);
}
/**