BUGFIX Unregistering custom Authenticators in SecurityTest->setUp()

This commit is contained in:
Ingo Schommer 2011-01-11 22:19:38 +13:00
parent da909a0214
commit d099c7e5ba

View File

@ -20,6 +20,9 @@ class SecurityTest extends FunctionalTest {
// This test assumes that MemberAuthenticator is present and the default
$this->priorAuthenticators = Authenticator::get_authenticators();
$this->priorDefaultAuthenticator = Authenticator::get_default_authenticator();
foreach($this->priorAuthenticators as $authenticator) {
Authenticator::unregister($authenticator);
}
Authenticator::register('MemberAuthenticator');
Authenticator::set_default_authenticator('MemberAuthenticator');
@ -38,6 +41,9 @@ class SecurityTest extends FunctionalTest {
if(!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
Authenticator::unregister('MemberAuthenticator');
}
foreach($this->priorAuthenticators as $authenticator) {
Authenticator::register($authenticator);
}
Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
// Restore unique identifier field