Fix FunctionalTest not setting persistent versioned mode

This commit is contained in:
Damian Mooyman 2018-03-21 16:07:31 +13:00
parent 26402f3bb5
commit ba94e020e7
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
1 changed files with 5 additions and 7 deletions

View File

@ -406,15 +406,13 @@ class FunctionalTest extends SapphireTest implements TestOnly
* This is helpful if you're not testing publication functionality and don't want "stage management" cluttering
* your test.
*
* @param bool $enabled toggle the use of the draft site
* @param bool $draft toggle the use of the draft site
*/
public function useDraftSite($enabled = true)
public function useDraftSite($draft = true)
{
if ($enabled) {
Versioned::set_stage(Versioned::DRAFT);
} else {
Versioned::set_stage(Versioned::LIVE);
}
$stage = $draft ? Versioned::DRAFT : Versioned::LIVE;
Versioned::set_stage($stage);
Versioned::set_default_reading_mode(Versioned::get_reading_mode());
}
/**