From fc1e7bd8a2ea96ec813c9c667d0484a2526d4d00 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 24 May 2013 18:31:07 +1200 Subject: [PATCH] FIX: Update use of deprecated methods --- tests/FilesystemPublisherTest.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/FilesystemPublisherTest.php b/tests/FilesystemPublisherTest.php index bad9f68..4106308 100644 --- a/tests/FilesystemPublisherTest.php +++ b/tests/FilesystemPublisherTest.php @@ -132,8 +132,8 @@ class FilesystemPublisherTest extends SapphireTest { */ public function testStaticPublisherTheme(){ - //This will be the name of the default theme of this particular project - $default_theme=SSViewer::current_theme(); + // This will be the name of the default theme of this particular project + $default_theme = Config::inst()->get('SSViewer', 'theme'); $p1 = new Page(); $p1->URLSegment = strtolower(__CLASS__).'-page-1'; @@ -141,20 +141,21 @@ class FilesystemPublisherTest extends SapphireTest { $p1->write(); $p1->doPublish(); - $current_theme=SSViewer::current_custom_theme(); + $current_theme = Config::inst()->get('SSViewer', 'theme_enabled') ? Config::inst()->get('SSViewer', 'theme') : null; $this->assertEquals($current_theme, $default_theme, 'After a standard publication, the theme is correct'); //We can set the static_publishing theme to something completely different: //Static publishing will use this one instead of the current_custom_theme if it is not false StaticPublisher::set_static_publisher_theme('otherTheme'); - $current_theme=StaticPublisher::static_publisher_theme(); + $current_theme = StaticPublisher::static_publisher_theme(); + $this->assertNotEquals($current_theme, $default_theme, 'The static publisher theme overrides the custom theme'); } public function testMenu2LinkingMode() { $this->logInWithPermission('ADMIN'); - SSViewer::set_theme(null); + Config::inst()->update('SSViewer', 'theme', null); $l1 = new StaticPublisherTestPage(); $l1->URLSegment = strtolower(__CLASS__).'-level-1';