mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MemberTest and SecurityTest now set the default authenticator to use
This commit is contained in:
parent
acf449011b
commit
123d483213
@ -46,6 +46,17 @@ class MemberTest extends FunctionalTest
|
||||
//This is because the test relies on the yaml file being interpreted according to a particular date format
|
||||
//and this setup occurs before the setUp method is run
|
||||
i18n::config()->set('default_locale', 'en_US');
|
||||
|
||||
// Set the default authenticator to use for these tests
|
||||
Injector::inst()->load([
|
||||
Security::class => [
|
||||
'properties' => [
|
||||
'Authenticators' => [
|
||||
'default' => '%$' . MemberAuthenticator::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -393,6 +404,7 @@ class MemberTest extends FunctionalTest
|
||||
$member->PasswordExpiry = date('Y-m-d', time() + 86400);
|
||||
$this->assertFalse($member->isPasswordExpired());
|
||||
}
|
||||
|
||||
public function testInGroups()
|
||||
{
|
||||
/** @var Member $staffmember */
|
||||
|
@ -10,6 +10,7 @@ use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Control\Session;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Dev\FunctionalTest;
|
||||
use SilverStripe\i18n\i18n;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
@ -47,6 +48,17 @@ class SecurityTest extends FunctionalTest
|
||||
Config::modify()->set(MemberAuthenticator::class, 'authenticators', []);
|
||||
Config::modify()->set(MemberAuthenticator::class, 'default_authenticator', MemberAuthenticator::class);
|
||||
|
||||
// Set the default authenticator to use for these tests
|
||||
Injector::inst()->load([
|
||||
Security::class => [
|
||||
'properties' => [
|
||||
'Authenticators' => [
|
||||
'default' => '%$' . MemberAuthenticator::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
/**
|
||||
* @skipUpgrade
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user