Skip to content
Snippets Groups Projects
Commit 2102d9cb authored by Laurent's avatar Laurent
Browse files

When testing, catptcha behavior is switched to production one on tearDown

parent 3acc0828
Branches
Tags
3 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!180Master,!175Master
......@@ -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);
}
......
......@@ -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();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment