diff --git a/tests/model/ErrorPageTest.php b/tests/model/ErrorPageTest.php index a5ed37a1..fdc516cd 100644 --- a/tests/model/ErrorPageTest.php +++ b/tests/model/ErrorPageTest.php @@ -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) { diff --git a/tests/model/SiteTreeTest.php b/tests/model/SiteTreeTest.php index 8a7b71de..164c752b 100644 --- a/tests/model/SiteTreeTest.php +++ b/tests/model/SiteTreeTest.php @@ -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() {