From 2c121e8a07297baa89c0bedad086b1a62de2ba0a Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 26 Sep 2017 12:24:09 +0100 Subject: [PATCH] new approach --- src/Dev/FunctionalTest.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Dev/FunctionalTest.php b/src/Dev/FunctionalTest.php index add41d955..7df93552f 100644 --- a/src/Dev/FunctionalTest.php +++ b/src/Dev/FunctionalTest.php @@ -105,11 +105,6 @@ class FunctionalTest extends SapphireTest implements TestOnly // Flush user $this->logOut(); - // Switch to draft site, if necessary - if (static::get_use_draft_site()) { - $this->useDraftSite(); - } - // Unprotect the site, tests are running with the assumption it's off. They will enable it on a case-by-case // basis. BasicAuth::protect_entire_site(false); @@ -163,7 +158,7 @@ class FunctionalTest extends SapphireTest implements TestOnly public function get($url, $session = null, $headers = null, $cookies = null) { $this->cssParser = null; - if (Versioned::get_stage() === Versioned::DRAFT) { + if (self::get_use_draft_site()) { $url = HTTP::setGetVar('stage', Versioned::DRAFT, $url); } $response = $this->mainSession->get($url, $session, $headers, $cookies);