mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Adjusted tests to new SiteTree->canCreate() logic in 3.1.11+
Checks SiteConfig permissions by default now
This commit is contained in:
parent
999c115961
commit
c18a0a266f
@ -129,7 +129,8 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest {
|
||||
}
|
||||
|
||||
function testPageTypesBlacklistInClassDropdown() {
|
||||
Session::set("loggedInAs", null);
|
||||
$editor = $this->objFromFixture('Member', 'editor');
|
||||
Session::set("loggedInAs", $editor->ID);
|
||||
|
||||
$s1 = $this->objFromFixture('Subsite','domaintest1');
|
||||
$s2 = $this->objFromFixture('Subsite','domaintest2');
|
||||
@ -140,6 +141,7 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest {
|
||||
|
||||
Subsite::changeSubsite($s1);
|
||||
$settingsFields = $page->getSettingsFields()->dataFieldByName('ClassName')->getSource();
|
||||
|
||||
$this->assertArrayNotHasKey('ErrorPage',
|
||||
$settingsFields
|
||||
);
|
||||
@ -164,7 +166,8 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest {
|
||||
}
|
||||
|
||||
function testPageTypesBlacklistInCMSMain() {
|
||||
Session::set("loggedInAs", null);
|
||||
$editor = $this->objFromFixture('Member', 'editor');
|
||||
Session::set("loggedInAs", $editor->ID);
|
||||
|
||||
$cmsmain = new CMSMain();
|
||||
|
||||
|
@ -178,3 +178,7 @@ Member:
|
||||
subsite1member2:
|
||||
Email: subsite1member2@test.com
|
||||
Groups: =>Group.subsite1_group_via_role
|
||||
|
||||
SiteConfig:
|
||||
config:
|
||||
CanCreateTopLevelType: LoggedInUsers
|
Loading…
x
Reference in New Issue
Block a user