mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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
|
* This is helpful if you're not testing publication functionality and don't want "stage management" cluttering
|
||||||
* your test.
|
* 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) {
|
$stage = $draft ? Versioned::DRAFT : Versioned::LIVE;
|
||||||
Versioned::set_stage(Versioned::DRAFT);
|
Versioned::set_stage($stage);
|
||||||
} else {
|
Versioned::set_default_reading_mode(Versioned::get_reading_mode());
|
||||||
Versioned::set_stage(Versioned::LIVE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user