FIX Remove default password validation rules before running unit tests

This commit is contained in:
Robbie Averill 2018-11-13 14:08:28 +02:00
parent 10f502f0c7
commit 0bb94b018b

View File

@ -2,9 +2,9 @@
namespace SilverStripe\Security\Tests;
use SilverStripe\Security\PasswordValidator;
use SilverStripe\Security\Member;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Security\Member;
use SilverStripe\Security\PasswordValidator;
class PasswordValidatorTest extends SapphireTest
{
@ -14,6 +14,16 @@ class PasswordValidatorTest extends SapphireTest
*/
protected $usesDatabase = true;
protected function setUp()
{
parent::setUp();
// Unset framework default values
PasswordValidator::config()
->remove('min_length')
->remove('historic_count');
}
public function testValidate()
{
$v = new PasswordValidator();