Browse Source

Add two new tests to FormHelperTest

tobias-urdin 9 years ago
parent
commit
5902079c2c
1 changed files with 22 additions and 0 deletions
  1. 22 0
      tests/TestCase/View/Helper/FormHelperTest.php

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

@@ -3680,6 +3680,28 @@ class FormHelperTest extends TestCase
     }
 
     /**
+     * Test invalid 'input' type option to input() function.
+     *
+     * @expectedException \RuntimeException
+     * @return void
+     */
+    public function testInvalidInputTypeOptionLowercase()
+    {
+        $this->Form->input('text', ['type' => 'input']);
+    }
+
+    /**
+     * Test invalid 'Input' type option to input() function.
+     *
+     * @expectedException \RuntimeException
+     * @return void
+     */
+    public function testInvalidInputTypeOptionUppercase()
+    {
+        $this->Form->input('text', ['type' => 'Input']);
+    }
+
+    /**
      * Test that magic input() selects can easily be converted into radio types without error.
      *
      * @return void