FIX Ensure that tests setting passwords have stubbed configuration

This commit is contained in:
Robbie Averill 2018-11-14 11:54:17 +02:00
parent d1823665e7
commit 7d1d6d0f7b
2 changed files with 12 additions and 1 deletions

View File

@ -9,9 +9,18 @@ use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Security\Member;
use SilverStripe\Security\PasswordValidator;
class ConfirmedPasswordFieldTest extends SapphireTest
{
protected $usesDatabase = true;
protected function setUp()
{
parent::setUp();
PasswordValidator::singleton()->setMinLength(0);
}
public function testSetValue()
{

View File

@ -22,6 +22,7 @@ use SilverStripe\Security\MemberAuthenticator\MemberAuthenticator;
use SilverStripe\Security\MemberAuthenticator\SessionAuthenticationHandler;
use SilverStripe\Security\MemberPassword;
use SilverStripe\Security\PasswordEncryptor_Blowfish;
use SilverStripe\Security\PasswordValidator;
use SilverStripe\Security\Permission;
use SilverStripe\Security\RememberLoginHash;
use SilverStripe\Security\Security;
@ -55,7 +56,8 @@ class MemberTest extends FunctionalTest
parent::setUp();
Member::config()->set('unique_identifier_field', 'Email');
Member::set_password_validator(null);
PasswordValidator::singleton()->setMinLength(0);
i18n::set_locale('en_US');
}