mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Unregistering custom Authenticators in SecurityTest->setUp()
This commit is contained in:
parent
da909a0214
commit
d099c7e5ba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user