mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR more unit tests around loose hierarchy (from r98509) (from r99121)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111605 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4c510624b1
commit
2d02afc3f4
@ -107,6 +107,24 @@ class CMSMainTest extends FunctionalTest {
|
|||||||
|
|
||||||
$this->assertTrue($page->getCMSFields(null) instanceof FieldSet);
|
$this->assertTrue($page->getCMSFields(null) instanceof FieldSet);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function testCanPublishPageWithUnpublishedParentWithStrictHierarchyOff() {
|
||||||
|
$this->logInWithPermssion('ADMIN');
|
||||||
|
|
||||||
|
SiteTree::enforce_strict_hierarchy(true);
|
||||||
|
$parentPage = $this->objFromFixture('Page','page3');
|
||||||
|
$childPage = $this->objFromFixture('Page','page1');
|
||||||
|
|
||||||
|
$parentPage->doUnpublish();
|
||||||
|
$childPage->doUnpublish();
|
||||||
|
|
||||||
|
$this->assertContains(
|
||||||
|
'action_publish',
|
||||||
|
$childPage->getCMSActions()->column('Name'),
|
||||||
|
'Can publish a page with an unpublished parent with strict hierarchy off'
|
||||||
|
);
|
||||||
|
SiteTree::enforce_strict_hierarchy(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user