Procházet zdrojové kódy

fixes issue ZF-5256. checkbox value converted to string like checkedOptions are. also fixed bug with determineCheckboxInfo. was using wrong index for checked/unchecked values.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18627 44c647ce-9c0f-0410-b52a-842ac1e357ba
klassicd před 16 roky
rodič
revize
87b88d25d8
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6 0
      tests/Zend/View/Helper/FormCheckboxTest.php

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

@@ -297,6 +297,12 @@ class Zend_View_Helper_FormCheckboxTest extends PHPUnit_Framework_TestCase
        
        $test = $this->helper->formCheckbox('foo', 1, array(), array(1,0));
        $this->assertContains('checked="checked"', $test);
+       
+       $test = $this->helper->formCheckbox('foo', 0, array(), array('checked'=>1, 'unchecked'=>0));
+       $this->assertNotContains('checked="checked"', $test);
+       
+       $test = $this->helper->formCheckbox('foo', 0, array(), array(1,0));
+       $this->assertNotContains('checked="checked"', $test);
    }
 }