mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Remove default password validation rules before running unit tests
This commit is contained in:
parent
10f502f0c7
commit
0bb94b018b
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Security\Tests;
|
namespace SilverStripe\Security\Tests;
|
||||||
|
|
||||||
use SilverStripe\Security\PasswordValidator;
|
|
||||||
use SilverStripe\Security\Member;
|
|
||||||
use SilverStripe\Dev\SapphireTest;
|
use SilverStripe\Dev\SapphireTest;
|
||||||
|
use SilverStripe\Security\Member;
|
||||||
|
use SilverStripe\Security\PasswordValidator;
|
||||||
|
|
||||||
class PasswordValidatorTest extends SapphireTest
|
class PasswordValidatorTest extends SapphireTest
|
||||||
{
|
{
|
||||||
@ -14,6 +14,16 @@ class PasswordValidatorTest extends SapphireTest
|
|||||||
*/
|
*/
|
||||||
protected $usesDatabase = true;
|
protected $usesDatabase = true;
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
// Unset framework default values
|
||||||
|
PasswordValidator::config()
|
||||||
|
->remove('min_length')
|
||||||
|
->remove('historic_count');
|
||||||
|
}
|
||||||
|
|
||||||
public function testValidate()
|
public function testValidate()
|
||||||
{
|
{
|
||||||
$v = new PasswordValidator();
|
$v = new PasswordValidator();
|
||||||
|
Loading…
Reference in New Issue
Block a user