diff --git a/tests/SSViewerTest.php b/tests/SSViewerTest.php index f4ecef103..3fe08bbcf 100644 --- a/tests/SSViewerTest.php +++ b/tests/SSViewerTest.php @@ -8,26 +8,9 @@ class SSViewerTest extends SapphireTest { * when no user themes are defined. */ function testCurrentTheme() { - $config = SiteConfig::current_site_config(); - $oldTheme = $config->Theme; - $config->Theme = ''; - $config->write(); - + //TODO: SiteConfig moved to CMS SSViewer::set_theme('mytheme'); $this->assertEquals('mytheme', SSViewer::current_theme(), 'Current theme is the default - user has not defined one'); - - $config->Theme = 'myusertheme'; - $config->write(); - - // Pretent to load the page - $c = new ContentController(); - $c->handleRequest(new SS_HTTPRequest('GET', '/')); - - $this->assertEquals('myusertheme', SSViewer::current_theme(), 'Current theme is a user defined one'); - - // Set the theme back to the original - $config->Theme = $oldTheme; - $config->write(); } /** @@ -592,3 +575,8 @@ class SSViewerTest_ViewableData extends ViewableData implements TestOnly { return "arg1:{$arg1},arg2:{$arg2}"; } } + + +class SSViewerTest_Controller extends Controller { + +}