mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Update for security namespace
This commit is contained in:
parent
f03b0ab6c9
commit
ef723bb265
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
Member::add_extension('FrameworkTestRole');
|
||||
Member::add_extension('FileUploadRole');
|
||||
SiteTree::add_extension('FrameworkTestSiteTreeExtension');
|
||||
|
@ -3,6 +3,8 @@
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\DB;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
|
||||
class FrameworkTestRole extends DataExtension
|
||||
{
|
||||
@ -21,7 +23,7 @@ class FrameworkTestRole extends DataExtension
|
||||
|
||||
public function requireDefaultRecords()
|
||||
{
|
||||
$hasTestMembers = DataObject::get('Member')->find('Email', 'hayley@test.com');
|
||||
$hasTestMembers = Member::get()->find('Email', 'hayley@test.com');
|
||||
if (!$hasTestMembers) {
|
||||
foreach ($this->data() as $name) {
|
||||
$member = new Member(array(
|
||||
|
@ -1,4 +1,8 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\Security\Permission;
|
||||
use SilverStripe\Security\Security;
|
||||
|
||||
/**
|
||||
* Starts a test session with various configurations set in session.
|
||||
* These configurations are assumed to be evaluated in mysite/_config.php,
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
use SilverStripe\FrameworkTest\Model\TestPage;
|
||||
use SilverStripe\FrameworkTest\Model\TestPage_Controller;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
class TestFileUploadPage extends TestPage
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
class Page2MultiForm extends MultiForm
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
class Page3MultiForm extends MultiForm
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user