Browse Source

Add additional tests for hidden input.

mark_story 12 years ago
parent
commit
6177246ffa
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tests/TestCase/View/Helper/FormHelperTest.php

+ 6 - 0
tests/TestCase/View/Helper/FormHelperTest.php

@@ -7838,6 +7838,12 @@ class FormHelperTest extends TestCase {
 		$this->assertTags($result, array(
 			'input' => array('type' => 'hidden', 'class' => 'form-error', 'name' => 'field', 'id' => 'theID', 'value' => 'test'))
 		);
+
+		$result = $this->Form->hidden('field', ['value' => 'my value']);
+		$expected = [
+			'input' => ['type' => 'hidden', 'class' => 'form-error', 'name' => 'field', 'value' => 'my value']
+		];
+		$this->assertTags($result, $expected);
 	}
 
 /**