Fix $disable_themes test state

Wasn't resetting the value after using it
This commit is contained in:
Ingo Schommer 2014-02-07 16:38:02 +13:00
parent 1e2a2ca969
commit db07a8e1df

View File

@ -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);
}
}
/**