diff --git a/tests/php/Forms/ConfirmedPasswordFieldTest.php b/tests/php/Forms/ConfirmedPasswordFieldTest.php index c034ef0cb..0df22d4a8 100644 --- a/tests/php/Forms/ConfirmedPasswordFieldTest.php +++ b/tests/php/Forms/ConfirmedPasswordFieldTest.php @@ -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() { diff --git a/tests/php/Security/MemberTest.php b/tests/php/Security/MemberTest.php index bdf664c1f..6817246f8 100644 --- a/tests/php/Security/MemberTest.php +++ b/tests/php/Security/MemberTest.php @@ -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'); }