mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fixing tests
This commit is contained in:
parent
7a296a541b
commit
916d7f3815
@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
use SilverStripe\ORM\Versioning\Versioned;
|
use SilverStripe\ORM\Versioning\Versioned;
|
||||||
use SilverStripe\CMS\Model\ErrorPage;
|
use SilverStripe\CMS\Model\ErrorPage;
|
||||||
|
use SilverStripe\CMS\Controllers\ContentController;
|
||||||
use SilverStripe\Core\Config\Config;
|
use SilverStripe\Core\Config\Config;
|
||||||
use SilverStripe\Dev\FunctionalTest;
|
use SilverStripe\Dev\FunctionalTest;
|
||||||
use SilverStripe\Assets\Tests\Storage\AssetStoreTest\TestAssetStore;
|
use SilverStripe\Assets\Tests\Storage\AssetStoreTest\TestAssetStore;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package cms
|
* @package cms
|
||||||
* @subpackage tests
|
* @subpackage tests
|
||||||
@ -70,7 +68,7 @@ class ErrorPageTest extends FunctionalTest {
|
|||||||
$page->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
|
$page->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$controller = singleton('ContentController');
|
$controller = singleton(ContentController::class);
|
||||||
$controller->httpError(403); $this->fail('Expected exception to be thrown');
|
$controller->httpError(403); $this->fail('Expected exception to be thrown');
|
||||||
}
|
}
|
||||||
catch(SS_HTTPResponse_Exception $e) {
|
catch(SS_HTTPResponse_Exception $e) {
|
||||||
|
@ -604,7 +604,7 @@ class SiteTreeTest extends SapphireTest {
|
|||||||
|
|
||||||
// Test creation underneath a parent which doesn't exist in the database. This should
|
// Test creation underneath a parent which doesn't exist in the database. This should
|
||||||
// fall back to checking whether the user can create pages at the root of the site
|
// fall back to checking whether the user can create pages at the root of the site
|
||||||
$this->assertTrue(singleton('SiteTree')->canCreate(null, array('Parent' => singleton('SiteTree'))));
|
$this->assertTrue(singleton(SiteTree::class)->canCreate(null, array('Parent' => singleton(SiteTree::class))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEditPermissionsOnDraftVsLive() {
|
public function testEditPermissionsOnDraftVsLive() {
|
||||||
|
Loading…
Reference in New Issue
Block a user