Browse Source

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

Ceeram 14 years ago
parent
commit
cfbc6d4989
1 changed files with 18 additions and 0 deletions
  1. 18 0
      lib/Cake/Test/Case/View/Helper/FormHelperTest.php

+ 18 - 0
lib/Cake/Test/Case/View/Helper/FormHelperTest.php

@@ -1925,6 +1925,24 @@ class FormHelperTest extends CakeTestCase {
 		$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(