diff --git a/library/ZendAfi/Form/Element/Captcha.php b/library/ZendAfi/Form/Element/Captcha.php index 7984964b952adccc5ce1fff71cd84113750dd327..5d7e4ba0f31d24312f2051b45256dfae2119af43 100644 --- a/library/ZendAfi/Form/Element/Captcha.php +++ b/library/ZendAfi/Form/Element/Captcha.php @@ -27,6 +27,10 @@ class ZendAfi_Form_Element_Captcha extends Zend_Form_Element_Captcha { static::$_be_valid = true; } + public static function reset() { + static::$_be_valid = false; + } + public function isValid($value, $context = null) { return static::$_be_valid ? true : parent::isValid($value, $context); } diff --git a/tests/application/modules/AbstractControllerTestCase.php b/tests/application/modules/AbstractControllerTestCase.php index 85e0506479d31f10fd907c4a2dede7ceed5b8c1f..a698fe5ad8003d4bf24bdbe785e1d7cc2ae93981 100644 --- a/tests/application/modules/AbstractControllerTestCase.php +++ b/tests/application/modules/AbstractControllerTestCase.php @@ -148,6 +148,7 @@ abstract class AbstractControllerTestCase extends Zend_Test_PHPUnit_ControllerTe Class_WebService_Abstract::resetHttpClient(); Class_WebService_AllServices::setHttpClient(null); Class_I18n::reset(); + ZendAfi_Form_Element_Captcha::reset(); }