function setUp() { // This test assumes that MemberAuthenticator is present and the default $this->priorAuthenticators = Authenticator::get_authenticators(); $this->priorDefaultAuthenticator = Authenticator::get_default_authenticator(); //Authenticator::register('MemberAuthenticator'); Authenticator::register_authenticator('ExternalAuthenticator'); Authenticator::set_default_authenticator('ExternalAuthenticator'); //Create the sources in this order. Switching them around would mean that //all tests use the fake driver because this always succeeds and auto create //is on ExternalAuthenticator::createSource('sstripe_unittest', 'SSTRIPE', 'SilverStripe'); ExternalAuthenticator::createSource('fake_unittest', 'FAKE', 'Fake Source'); ExternalAuthenticator::setAuthSequential(true); ExternalAuthenticator::setAuthSSLock('sstripe_unittest', true); ExternalAuthenticator::setAuthSSLock('fake_unittest', false); ExternalAuthenticator::setAutoAdd('fake_unittest', 'mygroup'); ExternalAuthenticator::setDefaultDomain('fake_unittest', 'silverstripe.com'); ExternalAuthenticator::setAuthDebug(false); ExternalAuthenticator::setAuditLogFile(false); ExternalAuthenticator::setAuditLogSStripe(true); parent::setUp(); }