mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix $disable_themes test state
Wasn't resetting the value after using it
This commit is contained in:
parent
1e2a2ca969
commit
db07a8e1df
@ -48,6 +48,11 @@ class FunctionalTest extends SapphireTest {
|
||||
* However, this will let you inspect the intermediary headers
|
||||
*/
|
||||
protected $autoFollowRedirection = true;
|
||||
|
||||
/**
|
||||
* @var String
|
||||
*/
|
||||
protected $originalTheme = null;
|
||||
|
||||
/**
|
||||
* Returns the {@link Session} object for this test
|
||||
@ -64,7 +69,10 @@ class FunctionalTest extends SapphireTest {
|
||||
$this->mainSession = new TestSession();
|
||||
|
||||
// Disable theme, if necessary
|
||||
if(static::get_disable_themes()) Config::inst()->update('SSViewer', 'theme', null);
|
||||
if(static::get_disable_themes()) {
|
||||
$this->originalTheme = Config::inst()->get('SSViewer', 'theme');
|
||||
Config::inst()->update('SSViewer', 'theme', null);
|
||||
}
|
||||
|
||||
// Switch to draft site, if necessary
|
||||
if(static::get_use_draft_site()) {
|
||||
@ -83,6 +91,10 @@ class FunctionalTest extends SapphireTest {
|
||||
|
||||
parent::tearDown();
|
||||
unset($this->mainSession);
|
||||
|
||||
if(static::get_disable_themes()) {
|
||||
Config::inst()->update('SSViewer', 'theme', $this->originalTheme);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user