Permalink
Browse files

adding extra test, disproves ticket [#2233 state:works-for-me]

  • Loading branch information...
1 parent e8e2bbc commit cfbc6d498920ccc41657257cb57107a673369ae4 @ceeram ceeram committed Nov 8, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -1925,6 +1925,24 @@ public function testInput() {
$this->assertTags($result, $expected);
$result = $this->Form->input('Contact.field', array(
+ 'type' => 'text', 'error' => array('attributes' => array('class' => 'error'))
+ ));
+ $expected = array(
+ 'div' => array('class' => 'input text error'),
+ 'label' => array('for' => 'ContactField'),
+ 'Field',
+ '/label',
+ 'input' => array(
+ 'type' => 'text', 'name' => 'data[Contact][field]',
+ 'id' => 'ContactField', 'class' => 'form-error'
+ ),
+ array('div' => array('class' => 'error')),
+ 'Badness!',
+ '/div'
+ );
+ $this->assertTags($result, $expected);
+
+ $result = $this->Form->input('Contact.field', array(
'div' => array('tag' => 'span'), 'error' => array('attributes' => array('wrap' => false))
));
$expected = array(

0 comments on commit cfbc6d4

Please sign in to comment.