Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add test to show label options in inputDefaults

  • Loading branch information...
commit 8c631fa0224a0572aeb090f2af671d7c2161de1b 1 parent 5c590aa
@ceeram ceeram authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
View
15 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.