mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix FunctionalTest not setting persistent versioned mode
This commit is contained in:
parent
26402f3bb5
commit
ba94e020e7
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user