mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Fixing tests
This commit is contained in:
parent
7a296a541b
commit
916d7f3815
@ -2,13 +2,11 @@
|
||||
|
||||
use SilverStripe\ORM\Versioning\Versioned;
|
||||
use SilverStripe\CMS\Model\ErrorPage;
|
||||
use SilverStripe\CMS\Controllers\ContentController;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Dev\FunctionalTest;
|
||||
use SilverStripe\Assets\Tests\Storage\AssetStoreTest\TestAssetStore;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @package cms
|
||||
* @subpackage tests
|
||||
@ -70,7 +68,7 @@ class ErrorPageTest extends FunctionalTest {
|
||||
$page->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
|
||||
|
||||
try {
|
||||
$controller = singleton('ContentController');
|
||||
$controller = singleton(ContentController::class);
|
||||
$controller->httpError(403); $this->fail('Expected exception to be thrown');
|
||||
}
|
||||
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
|
||||
// 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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user