Преглед изворни кода

[ZF-11151] Zend_Form
- Fixed typo in decorator form errors.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23852 44c647ce-9c0f-0410-b52a-842ac1e357ba

ramon пре 14 година
родитељ
комит
d714e79812

+ 1 - 1
library/Zend/Form/Decorator/FormErrors.php

@@ -351,7 +351,7 @@ class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
     public function getShowCustomFormErrors()
     {
         if (null === $this->_showCustomFormErrors) {
-            if (null === ($how =  $this->getOption('showCustomFormErrors'))) {
+            if (null === ($show =  $this->getOption('showCustomFormErrors'))) {
                 $this->setShowCustomFormErrors($this->_defaults['showCustomFormErrors']);
             } else {
                 $this->setShowCustomFormErrors($show);

+ 11 - 0
tests/Zend/Form/Decorator/FormErrorsTest.php

@@ -318,6 +318,17 @@ class Zend_Form_Decorator_FormErrorsTest extends PHPUnit_Framework_TestCase
         }
     }
 
+    /**
+     * @group ZF-11151
+     */
+    public function testOptionShowCustomFormErrors()
+    {
+        $this->decorator
+             ->setOption('showCustomFormErrors', true);
+
+        $this->assertTrue($this->decorator->getShowCustomFormErrors());
+    }
+
     public function markupOptionMethodsProvider()
     {
         return array(