Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 2d02afc3f4093c2f0d7fa41552dc9c90fb912400 1 parent 4c51062
@sminnee sminnee authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/CMSMainTest.php
View
18 tests/CMSMainTest.php
@@ -107,6 +107,24 @@ function testThatGetCMSFieldsWorksOnEveryPageType() {
$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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.