mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1970 from mikenz/patch-7
Tests: Batch Actions Tests assume enforce_strict_hierarchy is enabled
This commit is contained in:
commit
72289a1ae7
@ -3,12 +3,13 @@
|
|||||||
namespace SilverStripe\CMS\Tests\Controllers;
|
namespace SilverStripe\CMS\Tests\Controllers;
|
||||||
|
|
||||||
use SilverStripe\CMS\BatchActions\CMSBatchAction_Archive;
|
use SilverStripe\CMS\BatchActions\CMSBatchAction_Archive;
|
||||||
use SilverStripe\Versioned\Versioned;
|
|
||||||
use SilverStripe\CMS\BatchActions\CMSBatchAction_Publish;
|
use SilverStripe\CMS\BatchActions\CMSBatchAction_Publish;
|
||||||
use SilverStripe\CMS\BatchActions\CMSBatchAction_Unpublish;
|
|
||||||
use SilverStripe\CMS\BatchActions\CMSBatchAction_Restore;
|
use SilverStripe\CMS\BatchActions\CMSBatchAction_Restore;
|
||||||
|
use SilverStripe\CMS\BatchActions\CMSBatchAction_Unpublish;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
|
use SilverStripe\Core\Config\Config;
|
||||||
use SilverStripe\Dev\SapphireTest;
|
use SilverStripe\Dev\SapphireTest;
|
||||||
|
use SilverStripe\Versioned\Versioned;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests CMS Specific subclasses of {@see CMSBatchAction}
|
* Tests CMS Specific subclasses of {@see CMSBatchAction}
|
||||||
@ -24,6 +25,9 @@ class CMSBatchActionsTest extends SapphireTest
|
|||||||
|
|
||||||
$this->logInWithPermission('ADMIN');
|
$this->logInWithPermission('ADMIN');
|
||||||
|
|
||||||
|
// Tests assume strict hierarchy is enabled
|
||||||
|
Config::inst()->update(SiteTree::class, 'enforce_strict_hierarchy', true);
|
||||||
|
|
||||||
// published page
|
// published page
|
||||||
$published = $this->objFromFixture(SiteTree::class, 'published');
|
$published = $this->objFromFixture(SiteTree::class, 'published');
|
||||||
$published->publishSingle();
|
$published->publishSingle();
|
||||||
|
Loading…
Reference in New Issue
Block a user