Skip to content

Commit

Permalink
add test to show label options in inputDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Apr 5, 2012
1 parent 5c590aa commit 8c631fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/Cake/Test/Case/View/Helper/FormHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6603,6 +6603,21 @@ public function testCreateWithInputDefaults() {
'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);
}

/**
Expand Down

0 comments on commit 8c631fa

Please sign in to comment.