mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Set minimum test scores and password length for Members while running fixtured DataObject tests
This commit is contained in:
parent
4b44272367
commit
f354e2018d
@ -4,8 +4,6 @@ namespace SilverStripe\ORM\Tests;
|
|||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use LogicException;
|
use LogicException;
|
||||||
use Page;
|
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
|
||||||
use SilverStripe\Core\Config\Config;
|
use SilverStripe\Core\Config\Config;
|
||||||
use SilverStripe\Dev\SapphireTest;
|
use SilverStripe\Dev\SapphireTest;
|
||||||
use SilverStripe\i18n\i18n;
|
use SilverStripe\i18n\i18n;
|
||||||
@ -20,11 +18,8 @@ use SilverStripe\ORM\FieldType\DBPolymorphicForeignKey;
|
|||||||
use SilverStripe\ORM\FieldType\DBVarchar;
|
use SilverStripe\ORM\FieldType\DBVarchar;
|
||||||
use SilverStripe\ORM\ManyManyList;
|
use SilverStripe\ORM\ManyManyList;
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\Company;
|
use SilverStripe\ORM\Tests\DataObjectTest\Company;
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\Fan;
|
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\OtherSubclassWithSameField;
|
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\Player;
|
use SilverStripe\ORM\Tests\DataObjectTest\Player;
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\SubTeam;
|
use SilverStripe\Security\Member;
|
||||||
use SilverStripe\ORM\Tests\DataObjectTest\Team;
|
|
||||||
use SilverStripe\View\ViewableData;
|
use SilverStripe\View\ViewableData;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
@ -66,6 +61,19 @@ class DataObjectTest extends SapphireTest
|
|||||||
DataObjectTest\MockDynamicAssignmentDataObject::class
|
DataObjectTest\MockDynamicAssignmentDataObject::class
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$validator = Member::password_validator();
|
||||||
|
if ($validator) {
|
||||||
|
// Set low default password strength requirements so tests are not interfered with by user code
|
||||||
|
$validator
|
||||||
|
->setMinTestScore(0)
|
||||||
|
->setMinLength(6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function getExtraDataObjects()
|
public static function getExtraDataObjects()
|
||||||
{
|
{
|
||||||
return array_merge(
|
return array_merge(
|
||||||
|
Loading…
Reference in New Issue
Block a user