Merge pull request #1970 from mikenz/patch-7

Tests: Batch Actions Tests assume enforce_strict_hierarchy is enabled
This commit is contained in:
Daniel Hensby 2017-09-16 22:56:26 +01:00 committed by GitHub
commit 72289a1ae7

View File

@ -3,12 +3,13 @@
namespace SilverStripe\CMS\Tests\Controllers;
use SilverStripe\CMS\BatchActions\CMSBatchAction_Archive;
use SilverStripe\Versioned\Versioned;
use SilverStripe\CMS\BatchActions\CMSBatchAction_Publish;
use SilverStripe\CMS\BatchActions\CMSBatchAction_Unpublish;
use SilverStripe\CMS\BatchActions\CMSBatchAction_Restore;
use SilverStripe\CMS\BatchActions\CMSBatchAction_Unpublish;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Versioned\Versioned;
/**
* Tests CMS Specific subclasses of {@see CMSBatchAction}
@ -24,6 +25,9 @@ class CMSBatchActionsTest extends SapphireTest
$this->logInWithPermission('ADMIN');
// Tests assume strict hierarchy is enabled
Config::inst()->update(SiteTree::class, 'enforce_strict_hierarchy', true);
// published page
$published = $this->objFromFixture(SiteTree::class, 'published');
$published->publishSingle();