Fixing tests

This commit is contained in:
Daniel Hensby 2016-12-28 17:10:45 +00:00
parent 7a296a541b
commit 916d7f3815
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
2 changed files with 3 additions and 5 deletions

View File

@ -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) {

View File

@ -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() {