mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
new approach
This commit is contained in:
parent
7f7fe73b77
commit
2c121e8a07
@ -105,11 +105,6 @@ class FunctionalTest extends SapphireTest implements TestOnly
|
|||||||
// Flush user
|
// Flush user
|
||||||
$this->logOut();
|
$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
|
// Unprotect the site, tests are running with the assumption it's off. They will enable it on a case-by-case
|
||||||
// basis.
|
// basis.
|
||||||
BasicAuth::protect_entire_site(false);
|
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)
|
public function get($url, $session = null, $headers = null, $cookies = null)
|
||||||
{
|
{
|
||||||
$this->cssParser = null;
|
$this->cssParser = null;
|
||||||
if (Versioned::get_stage() === Versioned::DRAFT) {
|
if (self::get_use_draft_site()) {
|
||||||
$url = HTTP::setGetVar('stage', Versioned::DRAFT, $url);
|
$url = HTTP::setGetVar('stage', Versioned::DRAFT, $url);
|
||||||
}
|
}
|
||||||
$response = $this->mainSession->get($url, $session, $headers, $cookies);
|
$response = $this->mainSession->get($url, $session, $headers, $cookies);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user