Просмотр исходного кода

test for #ZF-6467. if disable attrib is true then hidden form field is not printed.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18583 44c647ce-9c0f-0410-b52a-842ac1e357ba
klassicd 16 лет назад
Родитель
Сommit
25f96aee0d
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      tests/Zend/View/Helper/FormCheckboxTest.php

+ 9 - 0
tests/Zend/View/Helper/FormCheckboxTest.php

@@ -274,6 +274,15 @@ class Zend_View_Helper_FormCheckboxTest extends PHPUnit_Framework_TestCase
         $test = $this->helper->formCheckbox('foo', 'bar');
         $this->assertContains(' />', $test);
     }
+    
+   /**
+    * @see ZF-6467
+    */
+   public function testShouldNotShowHiddenFieldIfDisableIsTrue()
+   {
+       $test = $this->helper->formCheckbox('foo', 'bar', array('disable' => true));
+       $this->assertNotContains('type="hidden"', $test);
+   }
 }
 
 // Call Zend_View_Helper_FormCheckboxTest::main() if this source file is executed directly.