Permalink
Browse files

MINOR Fixed SSViewerTest->testCurrentTheme() not to rely on SiteConfig

  • Loading branch information...
1 parent eb221ca commit 251c1df63a820bdf8bf82f37a36c9c2060895362 Paul Meyrick committed with chillu Mar 18, 2011
Showing with 6 additions and 18 deletions.
  1. +6 −18 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 @@ function methodWithTwoArguments($arg1, $arg2) {
return "arg1:{$arg1},arg2:{$arg2}";
}
}
+
+
+class SSViewerTest_Controller extends Controller {
+
+}

0 comments on commit 251c1df

Please sign in to comment.