From c7b06663907b6e7b0502190e42ab258d5577af34 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 17 Feb 2013 23:22:02 +0100 Subject: [PATCH 01/10] BUG Escape page titles in CommentAdmin table listing --- code/CommentAdmin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/CommentAdmin.php b/code/CommentAdmin.php index 4cac3955..8742fb51 100644 --- a/code/CommentAdmin.php +++ b/code/CommentAdmin.php @@ -93,7 +93,8 @@ class CommentAdmin extends LeftAndMain { $table->setParentClass(false); $table->setFieldCasting(array( 'Created' => 'SS_Datetime->Full', - 'Comment' => array('HTMLText->LimitCharacters', 150) + 'Comment' => array('HTMLText->LimitCharacters', 150), + 'Parent.Title' => 'Text', )); $table->setPageSize(self::get_comments_per_page()); From 68ebc5d221b7cc3ba15c4365525ce4f59ae3ec60 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Wed, 27 Feb 2013 15:00:34 +1300 Subject: [PATCH 02/10] FIX CMSMainTest to access batch_action config property properly --- tests/controller/CMSMainTest.php | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tests/controller/CMSMainTest.php b/tests/controller/CMSMainTest.php index 877575b7..f4f9b900 100644 --- a/tests/controller/CMSMainTest.php +++ b/tests/controller/CMSMainTest.php @@ -9,23 +9,6 @@ class CMSMainTest extends FunctionalTest { static protected $orig = array(); - public function setUpOnce() { - self::$orig['CMSBatchActionHandler_batch_actions'] = CMSBatchActionHandler::$batch_actions; - CMSBatchActionHandler::$batch_actions = array( - 'publish' => 'CMSBatchAction_Publish', - 'delete' => 'CMSBatchAction_Delete', - 'deletefromlive' => 'CMSBatchAction_DeleteFromLive', - ); - - parent::setUpOnce(); - } - - public function tearDownOnce() { - CMSBatchActionHandler::$batch_actions = self::$orig['CMSBatchActionHandler_batch_actions']; - - parent::tearDownOnce(); - } - function testSiteTreeHints() { $cache = SS_Cache::factory('CMSMain_SiteTreeHints'); $cache->clean(Zend_Cache::CLEANING_MODE_ALL); @@ -97,7 +80,8 @@ class CMSMainTest extends FunctionalTest { ); // Some modules (e.g., cmsworkflow) will remove this action - if(isset(CMSBatchActionHandler::$batch_actions['publish'])) { + $actions = CMSBatchActionHandler::config()->batch_actions; + if(isset($actions['publish'])) { $response = $this->get('admin/pages/batchactions/publish?ajax=1&csvIDs=' . implode(',', array($page1->ID, $page2->ID))); $responseData = Convert::json2array($response->getBody()); $this->assertArrayHasKey($page1->ID, $responseData['modified']); From 1e1049b5c82dd4d0e00aa1fd5f4a09e5f3ed7c20 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 14 Mar 2013 17:31:36 +0100 Subject: [PATCH 03/10] NEW "Show children as list" tree context action Allows for easier navigation between tree and list, particularly if a node has many children nodes (since it doesn't require expanding that node). Uses a new 'ss-tabs-force-active' class on the tabset to enforce the correct view state. This also fixes an issue where you couldn't link to a list view directly via URL. --- javascript/CMSMain.Tree.js | 17 ++++++++++++++++- javascript/lang/en_US.js | 1 + templates/Includes/CMSMain_TreeView.ss | 2 +- .../Includes/CMSPagesController_Content.ss | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/javascript/CMSMain.Tree.js b/javascript/CMSMain.Tree.js index cbd56f91..6d98c8aa 100644 --- a/javascript/CMSMain.Tree.js +++ b/javascript/CMSMain.Tree.js @@ -12,12 +12,27 @@ 'edit': { 'label': ss.i18n._t('Tree.EditPage'), 'action': function(obj) { - $('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf( + $('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf( self.data('urlEditpage'), obj.data('id') )); } } }; + + // Add "show as list" + if(!node.hasClass('nochildren')) { + menuitems['showaslist'] = { + 'label': ss.i18n._t('Tree.ShowAsList'), + 'action': function(obj) { + $('.cms-container').entwine('.ss').loadPanel( + self.data('urlListview') + '&ParentID=' + obj.data('id'), + null, + // Default to list view tab + {tabState: {'pages-controller-cms-content': {'tabSelector': '.content-listview'}}} + ); + } + }; + } // Build a list for allowed children as submenu entries var pagetype = node.data('pagetype'), diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js index 667c15e6..fa21cabc 100644 --- a/javascript/lang/en_US.js +++ b/javascript/lang/en_US.js @@ -33,6 +33,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { 'Tree.EditPage': 'Edit', 'Tree.ThisPageOnly': 'This page only', 'Tree.ThisPageAndSubpages': 'This page and subpages', + 'Tree.ShowAsList': 'Show children as list', 'CMSMain.ConfirmRestoreFromLive': "Do you really want to copy the published content to the draft site?", 'CMSMain.RollbackToVersion': "Do you really want to roll back to version #%s of this page?", 'URLSEGMENT.Edit': 'Edit', diff --git a/templates/Includes/CMSMain_TreeView.ss b/templates/Includes/CMSMain_TreeView.ss index 83cec419..79e9c543 100644 --- a/templates/Includes/CMSMain_TreeView.ss +++ b/templates/Includes/CMSMain_TreeView.ss @@ -19,7 +19,7 @@ $ExtraTreeTools <% end_if %> -
+
$SiteTreeAsUL
diff --git a/templates/Includes/CMSPagesController_Content.ss b/templates/Includes/CMSPagesController_Content.ss index 967ecd8d..da373bfc 100644 --- a/templates/Includes/CMSPagesController_Content.ss +++ b/templates/Includes/CMSPagesController_Content.ss @@ -7,10 +7,10 @@
    -
  • +
  • <% _t('CMSPagesController.TreeView', 'Tree View') %>
  • -
  • +
  • <% _t('CMSPagesController.ListView', 'List View') %>
  • ", implode(" ", $this->getMetadata($url))), @@ -282,8 +293,10 @@ class FilesystemPublisher extends StaticPublisher { }*/ } - if(self::$static_base_url) Director::setBaseURL($currentBaseURL); - if($this->fileExtension == 'php') SSViewer::setOption('rewriteHashlinks', true); + if(Config::inst()->get('FilesystemPublisher', 'static_base_url')) Config::inst()->update('Director', 'alternate_base_url', $currentBaseURL); + if($this->fileExtension == 'php') { + Config::inst()->update('SSViewer', 'rewrite_hash_links', true); + } $base = BASE_PATH . "/$this->destFolder"; foreach($files as $origUrl => $file) { diff --git a/code/staticpublisher/RsyncMultiHostPublisher.php b/code/staticpublisher/RsyncMultiHostPublisher.php index 957bd03d..0ca03f6b 100644 --- a/code/staticpublisher/RsyncMultiHostPublisher.php +++ b/code/staticpublisher/RsyncMultiHostPublisher.php @@ -11,29 +11,39 @@ */ class RsyncMultiHostPublisher extends FilesystemPublisher { /** + * @config * Array of rsync targets to publish to. These can either be local file names, or scp-style targets, in the form "user@server:path" */ - protected static $targets = array(); + private static $targets = array(); - protected static $excluded_folders = array(); + /** + * @config + * @var array + */ + private static $excluded_folders = array(); /** * Set the targets to publish to. * If target is an scp-style remote path, no password is accepted - we assume key-based authentication to be set up on the application server * initiating the publication. - * + * + * @deprecated 3.2 Use the "RsyncMultiHostPublisher.targets" config setting instead * @param $targets An array of targets to publish to. These can either be local file names, or scp-style targets, in the form "user@server:path" */ static public function set_targets($targets) { - self::$targets = $targets; + Deprecation::notice('3.2', 'Use the "RsyncMultiHostPublisher.targets" config setting instead'); + Config::inst()->update('RsyncMultiHostPublisher', 'targets', $targets); } /** * Specify folders to exclude from the rsync * For example, you could exclude assets. + * + * @deprecated 3.2 Use the "RsyncMultiHostPublisher.excluded_folders" config setting instead */ static public function set_excluded_folders($folders) { - self::$excluded_folders = $folders; + Deprecation::notice('3.2', 'Use the "RsyncMultiHostPublisher.excluded_folders" config setting instead'); + Config::inst()->update('RsyncMultiHostPublisher', 'excluded_folders', $folders); } public function publishPages($urls) { @@ -45,18 +55,18 @@ class RsyncMultiHostPublisher extends FilesystemPublisher { if(isset($_GET['norsync']) && $_GET['norsync']) return; $extraArg = ""; - if(self::$excluded_folders) foreach(self::$excluded_folders as $folder) { + if($this->config()->excluded_folders) foreach($this->config()->excluded_folders as $folder) { $extraArg .= " --exclude " . escapeshellarg($folder); } - foreach(self::$targets as $target) { + foreach((array)$this->config()->targets as $target) { // Transfer non-PHP content from everything to the target; that will ensure that we have all the JS/CSS/etc $rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`; // Then transfer "safe" PHP from the cache/ directory $rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`; // Transfer framework/static-main.php to the target $rsyncOutput .= `cd $base; rsync -av -e ssh --delete $framework/static-main.php $target/$framework`; - if(StaticPublisher::echo_progress()) echo $rsyncOutput; + if(Config::inst()->get('StaticPublisher', 'echo_progress')) echo $rsyncOutput; } } diff --git a/code/staticpublisher/StaticPublisher.php b/code/staticpublisher/StaticPublisher.php index 92a2f7a3..095053db 100644 --- a/code/staticpublisher/StaticPublisher.php +++ b/code/staticpublisher/StaticPublisher.php @@ -5,52 +5,71 @@ */ abstract class StaticPublisher extends DataExtension { /** - * Defines whether to output information about publishing or not. By + * @config + * @var boolean Defines whether to output information about publishing or not. By * default, this is off, and should be turned on when you want debugging * (for example, in a cron task) */ - static $echo_progress = false; + private static $echo_progress = false; /** - * Realtime static publishing... the second a page - * is saved, it is written to the cache + * @config + * @var boolean Realtime static publishing... the second a page + * is saved, it is written to the cache */ - static $disable_realtime = false; + private static $disable_realtime = false; /* - * This is the current static publishing theme, which can be set at any point - * If it's not set, then the last non-null theme, set via SSViewer::set_theme() is used + * @config + * @var boolean This is the current static publishing theme, which can be set at any point + * If it's not set, then the last non-null theme, set via Config::inst()->update('SSViewer', 'theme', ) is used * The obvious place to set this is in _config.php */ - static $static_publisher_theme=false; + private static $static_publisher_theme=false; abstract public function publishPages($pages); abstract public function unpublishPages($pages); + /** + * @deprecated 3.2 Use the "StaticPublisher.static_publisher_theme" config setting instead + * @param [type] $theme [description] + */ static public function set_static_publisher_theme($theme){ - self::$static_publisher_theme=$theme; + Deprecation::notice('3.2', 'Use the "StaticPublisher.static_publisher_theme" config setting instead'); + Config::inst()->update('StaticPublisher', 'static_publisher_theme', $theme); } /** + * @config * @var boolean Includes a timestamp at the bottom of the generated HTML of each file, * which can be useful for debugging issues with stale caches etc. */ - static $include_caching_metadata = false; + private static $include_caching_metadata = false; + /** + * @deprecated 3.2 Use the "StaticPublisher.static_publisher_theme" config setting instead + */ static public function static_publisher_theme(){ - return self::$static_publisher_theme; + Deprecation::notice('3.2', 'Use the "StaticPublisher.static_publisher_theme" config setting instead'); + return Config::inst()->get('StaticPublisher', 'static_publisher_theme'); } + /** + * @deprecated 3.2 Use the "StaticPublisher.echo_progress" config setting instead + */ static public function echo_progress() { - return (boolean)self::$echo_progress; + Deprecation::notice('3.2', 'Use the "StaticPublisher.echo_progress" config setting instead'); + return Config::inst()->get('StaticPublisher', 'echo_progress'); } /** * Either turns on (boolean true) or off (boolean false) the progress indicators. + * @deprecated 3.2 Use the "StaticPublisher.echo_progress" config setting instead * @see StaticPublisher::$echo_progress */ static public function set_echo_progress($progress) { - self::$echo_progress = (boolean)$progress; + Deprecation::notice('3.2', 'Use the "StaticPublisher.echo_progress" config setting instead'); + Config::inst()->update('StaticPublisher', 'echo_progress', $progress); } /** @@ -71,7 +90,7 @@ abstract class StaticPublisher extends DataExtension { } public function republish($original) { - if (self::$disable_realtime) return; + if (Config::inst()->get('StaticPublisher', 'disable_realtime')) return; $urls = array(); @@ -109,7 +128,7 @@ abstract class StaticPublisher extends DataExtension { * functionality */ public function onAfterUnpublish($page) { - if (self::$disable_realtime) return; + if (Config::inst()->get('StaticPublisher', 'disable_realtime')) return; // Get the affected URLs if($this->owner->hasMethod('pagesAffectedByUnpublishing')) { diff --git a/tasks/RebuildStaticCacheTask.php b/tasks/RebuildStaticCacheTask.php index 5400beb7..0a903ce6 100644 --- a/tasks/RebuildStaticCacheTask.php +++ b/tasks/RebuildStaticCacheTask.php @@ -7,7 +7,7 @@ */ class RebuildStaticCacheTask extends Controller { - static $allowed_actions = array( + private static $allowed_actions = array( 'index', ); @@ -21,7 +21,7 @@ class RebuildStaticCacheTask extends Controller { } public function index() { - StaticPublisher::set_echo_progress(true); + Config::inst()->update('StaticPublisher', 'echo_progress', true); $page = singleton('Page'); if(!$page->hasMethod('allPagesToCache')) { @@ -92,7 +92,7 @@ class RebuildStaticCacheTask extends Controller { if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) { echo "Removing stale cache files... \n"; flush(); - if (FilesystemPublisher::$domain_based_caching) { + if (Config::inst()->get('FilesystemPublisher', 'domain_based_caching')) { // Glob each dir, then glob each one of those foreach(glob(BASE_PATH . '/cache/*', GLOB_ONLYDIR) as $cacheDir) { foreach(glob($cacheDir.'/*') as $cacheFile) { diff --git a/tasks/RemoveOrphanedPagesTask.php b/tasks/RemoveOrphanedPagesTask.php index 35fa534a..c48f120e 100644 --- a/tasks/RemoveOrphanedPagesTask.php +++ b/tasks/RemoveOrphanedPagesTask.php @@ -23,7 +23,7 @@ //class RemoveOrphanedPagesTask extends BuildTask { class RemoveOrphanedPagesTask extends Controller { - static $allowed_actions = array( + private static $allowed_actions = array( 'index' => 'ADMIN', 'Form' => 'ADMIN', 'run' => 'ADMIN', diff --git a/tasks/SiteTreeMaintenanceTask.php b/tasks/SiteTreeMaintenanceTask.php index f0370c29..0c84fd54 100644 --- a/tasks/SiteTreeMaintenanceTask.php +++ b/tasks/SiteTreeMaintenanceTask.php @@ -4,7 +4,7 @@ * @subpackage tasks */ class SiteTreeMaintenanceTask extends Controller { - static $allowed_actions = array( + private static $allowed_actions = array( '*' => 'ADMIN' ); diff --git a/tasks/UpgradeSiteTreePermissionSchemaTask.php b/tasks/UpgradeSiteTreePermissionSchemaTask.php index e6d99f45..ae770ada 100644 --- a/tasks/UpgradeSiteTreePermissionSchemaTask.php +++ b/tasks/UpgradeSiteTreePermissionSchemaTask.php @@ -4,7 +4,8 @@ * @subpackage tasks */ class UpgradeSiteTreePermissionSchemaTask extends BuildTask { - static $allowed_actions = array( + + private static $allowed_actions = array( '*' => 'ADMIN' ); diff --git a/tests/controller/CMSMainTest.php b/tests/controller/CMSMainTest.php index f4f9b900..f7dbb0b2 100644 --- a/tests/controller/CMSMainTest.php +++ b/tests/controller/CMSMainTest.php @@ -5,7 +5,7 @@ */ class CMSMainTest extends FunctionalTest { - static $fixture_file = 'CMSMainTest.yml'; + protected static $fixture_file = 'CMSMainTest.yml'; static protected $orig = array(); @@ -78,6 +78,8 @@ class CMSMainTest extends FunctionalTest { 'Done: Published 30 pages', $response->getBody() ); + + $actions = CMSBatchActionHandler::config()->batch_actions; // Some modules (e.g., cmsworkflow) will remove this action $actions = CMSBatchActionHandler::config()->batch_actions; @@ -159,7 +161,7 @@ class CMSMainTest extends FunctionalTest { public function testCanPublishPageWithUnpublishedParentWithStrictHierarchyOff() { $this->logInWithPermission('ADMIN'); - SiteTree::set_enforce_strict_hierarchy(true); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', true); $parentPage = $this->objFromFixture('Page','page3'); $childPage = $this->objFromFixture('Page','page1'); @@ -172,7 +174,7 @@ class CMSMainTest extends FunctionalTest { $actions, 'Can publish a page with an unpublished parent with strict hierarchy off' ); - SiteTree::set_enforce_strict_hierarchy(false); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', false); } /** @@ -329,7 +331,7 @@ class CMSMainTest extends FunctionalTest { } class CMSMainTest_ClassA extends Page implements TestOnly { - static $allowed_children = array('CMSMainTest_ClassB'); + private static $allowed_children = array('CMSMainTest_ClassB'); } class CMSMainTest_ClassB extends Page implements TestOnly { @@ -337,7 +339,7 @@ class CMSMainTest_ClassB extends Page implements TestOnly { } class CMSMainTest_NotRoot extends Page implements TestOnly { - static $can_be_root = false; + private static $can_be_root = false; } class CMSMainTest_HiddenClass extends Page implements TestOnly, HiddenClass { diff --git a/tests/controller/CMSPageHistoryControllerTest.php b/tests/controller/CMSPageHistoryControllerTest.php index 58ec75d6..18f0d6d5 100755 --- a/tests/controller/CMSPageHistoryControllerTest.php +++ b/tests/controller/CMSPageHistoryControllerTest.php @@ -7,7 +7,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest { - static $fixture_file = 'CMSPageHistoryControllerTest.yml'; + protected static $fixture_file = 'CMSPageHistoryControllerTest.yml'; private $versionUnpublishedCheck, $versionPublishCheck, $versionUnpublishedCheck2; private $page; diff --git a/tests/controller/CMSSiteTreeFilterTest.php b/tests/controller/CMSSiteTreeFilterTest.php index 2e3c79bc..96e18ea0 100644 --- a/tests/controller/CMSSiteTreeFilterTest.php +++ b/tests/controller/CMSSiteTreeFilterTest.php @@ -1,7 +1,7 @@ objFromFixture('Page', 'page1'); diff --git a/tests/controller/ContentControllerTest.php b/tests/controller/ContentControllerTest.php index b290444f..4c8e0377 100644 --- a/tests/controller/ContentControllerTest.php +++ b/tests/controller/ContentControllerTest.php @@ -5,9 +5,9 @@ */ class ContentControllerTest extends FunctionalTest { - public static $fixture_file = 'ContentControllerTest.yml'; + protected static $fixture_file = 'ContentControllerTest.yml'; - public static $use_draft_site = true; + protected static $use_draft_site = true; /** * Test that nested pages, basic actions, and nested/non-nested URL switching works properly @@ -15,7 +15,7 @@ class ContentControllerTest extends FunctionalTest { public function testNestedPages() { RootURLController::reset(); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $this->assertEquals('Home Page', $this->get('/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/index/')->getBody()); @@ -30,7 +30,7 @@ class ContentControllerTest extends FunctionalTest { $this->assertEquals('Third Level Page', $this->get('/home/second-level/third-level/second-index/')->getBody()); RootURLController::reset(); - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; $this->assertEquals('Home Page', $this->get('/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/')->getBody()); @@ -51,14 +51,14 @@ class ContentControllerTest extends FunctionalTest { public function testChildrenOf() { $controller = new ContentController(); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $this->assertEquals(1, $controller->ChildrenOf('/')->Count()); $this->assertEquals(1, $controller->ChildrenOf('/home/')->Count()); $this->assertEquals(2, $controller->ChildrenOf('/home/second-level/')->Count()); $this->assertEquals(0, $controller->ChildrenOf('/home/second-level/third-level/')->Count()); - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; $this->assertEquals(1, $controller->ChildrenOf('/')->Count()); $this->assertEquals(1, $controller->ChildrenOf('/home/')->Count()); @@ -67,7 +67,7 @@ class ContentControllerTest extends FunctionalTest { } public function testDeepNestedURLs() { - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $page = new Page(); $page->URLSegment = 'base-page'; @@ -87,7 +87,7 @@ class ContentControllerTest extends FunctionalTest { } - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; } public function testViewDraft(){ @@ -129,7 +129,7 @@ class ContentControllerTest_Page extends Page { } class ContentControllerTest_Page_Controller extends Page_Controller { - public static $allowed_actions = array ( + private static $allowed_actions = array ( 'second_index' ); diff --git a/tests/controller/ModelAsControllerTest.php b/tests/controller/ModelAsControllerTest.php index ef5cc76d..8bdff26f 100644 --- a/tests/controller/ModelAsControllerTest.php +++ b/tests/controller/ModelAsControllerTest.php @@ -7,7 +7,7 @@ class ModelAsControllerTest extends FunctionalTest { protected $usesDatabase = true; - static $fixture_file = 'ModelAsControllerTest.yml'; + protected static $fixture_file = 'ModelAsControllerTest.yml'; protected $autoFollowRedirection = false; @@ -22,8 +22,8 @@ class ModelAsControllerTest extends FunctionalTest { public function setUp() { parent::setUp(); - $this->orig['nested_urls'] = SiteTree::nested_urls(); - SiteTree::enable_nested_urls(); + $this->orig['nested_urls'] = SiteTree::config()->nested_urls; + Config::inst()->update('SiteTree', 'nested_urls', true); } /** @@ -35,7 +35,7 @@ class ModelAsControllerTest extends FunctionalTest { public function tearDown() { if (isset($this->orig['nested_urls']) && !$this->orig['nested_urls']) { - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; } parent::tearDown(); } @@ -241,7 +241,7 @@ class ModelAsControllerTest extends FunctionalTest { */ public function testChildOfDraft() { RootURLController::reset(); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $draft = new Page(); $draft->Title = 'Root Leve Draft Page'; diff --git a/tests/controller/RootURLControllerTest.php b/tests/controller/RootURLControllerTest.php index de169983..36659863 100644 --- a/tests/controller/RootURLControllerTest.php +++ b/tests/controller/RootURLControllerTest.php @@ -4,14 +4,14 @@ * @subpackage tests */ class RootURLControllerTest extends SapphireTest { - static $fixture_file = 'RootURLControllerTest.yml'; + protected static $fixture_file = 'RootURLControllerTest.yml'; public function testGetHomepageLink() { $default = $this->objFromFixture('Page', 'home'); - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; $this->assertEquals('home', RootURLController::get_homepage_link()); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $this->assertEquals('home', RootURLController::get_homepage_link()); } diff --git a/tests/controller/SilverStripeNavigatorTest.php b/tests/controller/SilverStripeNavigatorTest.php index b0caec3f..5a522b00 100644 --- a/tests/controller/SilverStripeNavigatorTest.php +++ b/tests/controller/SilverStripeNavigatorTest.php @@ -6,7 +6,7 @@ class SilverStripeNavigatorTest extends SapphireTest { - static $fixture_file = 'cms/tests/controller/CMSMainTest.yml'; + protected static $fixture_file = 'cms/tests/controller/CMSMainTest.yml'; public function testGetItems() { $page = $this->objFromFixture('Page', 'page1'); diff --git a/tests/model/ErrorPageTest.php b/tests/model/ErrorPageTest.php index 8e29f2d7..8bd08bdc 100644 --- a/tests/model/ErrorPageTest.php +++ b/tests/model/ErrorPageTest.php @@ -5,7 +5,7 @@ */ class ErrorPageTest extends FunctionalTest { - static $fixture_file = 'ErrorPageTest.yml'; + protected static $fixture_file = 'ErrorPageTest.yml'; protected $orig = array(); @@ -14,20 +14,18 @@ class ErrorPageTest extends FunctionalTest { public function setUp() { parent::setUp(); - $this->orig['ErrorPage_staticfilepath'] = ErrorPage::get_static_filepath(); + $this->orig['ErrorPage_staticfilepath'] = ErrorPage::config()->static_filepath; $this->tmpAssetsPath = sprintf('%s/_tmp_assets_%s', TEMP_FOLDER, rand()); Filesystem::makeFolder($this->tmpAssetsPath . '/ErrorPageTest'); - ErrorPage::set_static_filepath($this->tmpAssetsPath . '/ErrorPageTest'); + ErrorPage::config()->static_filepath = $this->tmpAssetsPath . '/ErrorPageTest'; - $this->orig['Director_environmenttype'] = Director::get_environment_type(); - Director::set_environment_type('live'); + Config::inst()->update('Director', 'environment_type', 'live'); } public function tearDown() { parent::tearDown(); - ErrorPage::set_static_filepath($this->orig['ErrorPage_staticfilepath']); - Director::set_environment_type($this->orig['Director_environmenttype']); + ErrorPage::config()->static_filepath = $this->orig['ErrorPage_staticfilepath']; Filesystem::removeFolder($this->tmpAssetsPath . '/ErrorPageTest'); Filesystem::removeFolder($this->tmpAssetsPath); diff --git a/tests/model/FileLinkTrackingTest.php b/tests/model/FileLinkTrackingTest.php index 9dcf36ea..419af896 100644 --- a/tests/model/FileLinkTrackingTest.php +++ b/tests/model/FileLinkTrackingTest.php @@ -4,7 +4,7 @@ * Tests link tracking to files and images. */ class FileLinkTrackingTest extends SapphireTest { - static $fixture_file = "FileLinkTrackingTest.yml"; + protected static $fixture_file = "FileLinkTrackingTest.yml"; public function setUp() { parent::setUp(); diff --git a/tests/model/RedirectorPageTest.php b/tests/model/RedirectorPageTest.php index a1fd2285..24afdab8 100644 --- a/tests/model/RedirectorPageTest.php +++ b/tests/model/RedirectorPageTest.php @@ -1,8 +1,8 @@ assertContains('blackcandy', $themes, 'Test themes contain blackcandy theme'); $this->assertContains('darkshades', $themes, 'Test themes contain darkshades theme'); - SiteConfig::disable_theme('darkshades'); + SiteConfig::config()->disabled_themes = array('darkshades'); $themes = $config->getAvailableThemes($testThemeBaseDir); $this->assertFalse(in_array('darkshades', $themes), 'Darkshades was disabled - it is no longer available'); diff --git a/tests/model/SiteTreeActionsTest.php b/tests/model/SiteTreeActionsTest.php index e457d0b7..6fad34d1 100644 --- a/tests/model/SiteTreeActionsTest.php +++ b/tests/model/SiteTreeActionsTest.php @@ -14,7 +14,7 @@ */ class SiteTreeActionsTest extends FunctionalTest { - static $fixture_file = 'SiteTreeActionsTest.yml'; + protected static $fixture_file = 'SiteTreeActionsTest.yml'; public function testActionsReadonly() { if(class_exists('SiteTreeCMSWorkflow')) return true; diff --git a/tests/model/SiteTreeBacklinksTest.php b/tests/model/SiteTreeBacklinksTest.php index 9a4b58e8..c64b2678 100644 --- a/tests/model/SiteTreeBacklinksTest.php +++ b/tests/model/SiteTreeBacklinksTest.php @@ -1,7 +1,7 @@ array('SiteTreeBacklinksTest_DOD'), @@ -232,7 +232,7 @@ class SiteTreeBacklinksTest extends SapphireTest { class SiteTreeBacklinksTest_DOD extends DataExtension implements TestOnly { - static $db = array( + private static $db = array( 'ExtraContent' => 'HTMLText', ); diff --git a/tests/model/SiteTreeBrokenLinksTest.php b/tests/model/SiteTreeBrokenLinksTest.php index ee8e763e..67ebc029 100644 --- a/tests/model/SiteTreeBrokenLinksTest.php +++ b/tests/model/SiteTreeBrokenLinksTest.php @@ -4,7 +4,7 @@ * @subpackage tests */ class SiteTreeBrokenLinksTest extends SapphireTest { - static $fixture_file = 'SiteTreeBrokenLinksTest.yml'; + protected static $fixture_file = 'SiteTreeBrokenLinksTest.yml'; public function testBrokenLinksBetweenPages() { $obj = $this->objFromFixture('Page','content'); diff --git a/tests/model/SiteTreeHTMLEditorFieldTest.php b/tests/model/SiteTreeHTMLEditorFieldTest.php index 81481c16..cf2d4107 100644 --- a/tests/model/SiteTreeHTMLEditorFieldTest.php +++ b/tests/model/SiteTreeHTMLEditorFieldTest.php @@ -1,8 +1,8 @@ objFromFixture('SiteTree', 'home'); diff --git a/tests/model/SiteTreePermissionsTest.php b/tests/model/SiteTreePermissionsTest.php index e805b888..93731aff 100644 --- a/tests/model/SiteTreePermissionsTest.php +++ b/tests/model/SiteTreePermissionsTest.php @@ -7,7 +7,7 @@ * @todo Test canCreate() */ class SiteTreePermissionsTest extends FunctionalTest { - static $fixture_file = "SiteTreePermissionsTest.yml"; + protected static $fixture_file = "SiteTreePermissionsTest.yml"; protected $illegalExtensions = array( 'SiteTree' => array('SiteTreeSubsites') diff --git a/tests/model/SiteTreeTest.php b/tests/model/SiteTreeTest.php index f2d4b834..1ccafa70 100644 --- a/tests/model/SiteTreeTest.php +++ b/tests/model/SiteTreeTest.php @@ -4,7 +4,7 @@ * @subpackage tests */ class SiteTreeTest extends SapphireTest { - static $fixture_file = 'SiteTreeTest.yml'; + protected static $fixture_file = 'SiteTreeTest.yml'; protected $illegalExtensions = array( 'SiteTree' => array('SiteTreeSubsites') @@ -27,14 +27,14 @@ class SiteTreeTest extends SapphireTest { $this->assertEquals(DB::query('SELECT COUNT("ID") FROM "SiteTree"')->value(), 0); // Disable the creation - SiteTree::set_create_default_pages(false); + SiteTree::config()->create_default_pages = false; singleton('SiteTree')->requireDefaultRecords(); // The table should still be empty $this->assertEquals(DB::query('SELECT COUNT("ID") FROM "SiteTree"')->value(), 0); // Enable the creation - SiteTree::set_create_default_pages(true); + SiteTree::config()->create_default_pages = true; singleton('SiteTree')->requireDefaultRecords(); // The table should now have three rows (home, about-us, contact-us) @@ -273,7 +273,7 @@ class SiteTreeTest extends SapphireTest { $product = $this->objFromFixture('Page', 'product1'); $notFound = $this->objFromFixture('ErrorPage', '404'); - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; $this->assertEquals($home->ID, SiteTree::get_by_link('/', false)->ID); $this->assertEquals($home->ID, SiteTree::get_by_link('/home/', false)->ID); @@ -282,7 +282,7 @@ class SiteTreeTest extends SapphireTest { $this->assertEquals($product->ID, SiteTree::get_by_link($product->Link(), false)->ID); $this->assertEquals($notFound->ID, SiteTree::get_by_link($notFound->Link(), false)->ID); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $this->assertEquals($home->ID, SiteTree::get_by_link('/', false)->ID); $this->assertEquals($home->ID, SiteTree::get_by_link('/home/', false)->ID); @@ -300,7 +300,7 @@ class SiteTreeTest extends SapphireTest { $about = $this->objFromFixture('Page', 'about'); $staff = $this->objFromFixture('Page', 'staff'); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $this->assertEquals('about-us/', $about->RelativeLink(), 'Matches URLSegment on top level without parameters'); $this->assertEquals('about-us/my-staff/', $staff->RelativeLink(), 'Matches URLSegment plus parent on second level without parameters'); @@ -312,7 +312,7 @@ class SiteTreeTest extends SapphireTest { $parent = $this->objFromFixture('Page', 'about'); $child = $this->objFromFixture('Page', 'staff'); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $child->publish('Stage', 'Live'); $parent->URLSegment = 'changed-on-live'; @@ -326,7 +326,7 @@ class SiteTreeTest extends SapphireTest { } public function testDeleteFromStageOperatesRecursively() { - SiteTree::set_enforce_strict_hierarchy(false); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', false); $pageAbout = $this->objFromFixture('Page', 'about'); $pageStaff = $this->objFromFixture('Page', 'staff'); $pageStaffDuplicate = $this->objFromFixture('Page', 'staffduplicate'); @@ -336,7 +336,7 @@ class SiteTreeTest extends SapphireTest { $this->assertFalse(DataObject::get_by_id('Page', $pageAbout->ID)); $this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page); $this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page); - SiteTree::set_enforce_strict_hierarchy(true); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', true); } public function testDeleteFromStageOperatesRecursivelyStrict() { @@ -352,7 +352,7 @@ class SiteTreeTest extends SapphireTest { } public function testDeleteFromLiveOperatesRecursively() { - SiteTree::set_enforce_strict_hierarchy(false); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', false); $this->logInWithPermission('ADMIN'); $pageAbout = $this->objFromFixture('Page', 'about'); @@ -372,11 +372,11 @@ class SiteTreeTest extends SapphireTest { $this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page); $this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page); Versioned::reading_stage('Stage'); - SiteTree::set_enforce_strict_hierarchy(true); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', true); } public function testUnpublishDoesNotDeleteChildrenWithLooseHierachyOn() { - SiteTree::set_enforce_strict_hierarchy(false); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', false); $this->logInWithPermission('ADMIN'); $pageAbout = $this->objFromFixture('Page', 'about'); @@ -394,7 +394,7 @@ class SiteTreeTest extends SapphireTest { $this->assertTrue(DataObject::get_by_id('Page', $pageStaff->ID) instanceof Page); $this->assertTrue(DataObject::get_by_id('Page', $pageStaffDuplicate->ID) instanceof Page); Versioned::reading_stage('Stage'); - SiteTree::set_enforce_strict_hierarchy(true); + Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', true); } @@ -634,7 +634,7 @@ class SiteTreeTest extends SapphireTest { */ public function testValidURLSegmentURLSegmentConflicts() { $sitetree = new SiteTree(); - SiteTree::disable_nested_urls(); + SiteTree::config()->nested_urls = false; $sitetree->URLSegment = 'home'; $this->assertFalse($sitetree->validURLSegment(), 'URLSegment conflicts are recognised'); @@ -645,7 +645,7 @@ class SiteTreeTest extends SapphireTest { $sitetree->URLSegment = 'home'; $this->assertFalse($sitetree->validURLSegment(), 'Conflicts are still recognised with a ParentID value'); - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $sitetree->ParentID = 0; $sitetree->URLSegment = 'home'; @@ -674,7 +674,7 @@ class SiteTreeTest extends SapphireTest { * @covers SiteTree::validURLSegment */ public function testValidURLSegmentControllerConflicts() { - SiteTree::enable_nested_urls(); + Config::inst()->update('SiteTree', 'nested_urls', true); $sitetree = new SiteTree(); $sitetree->ParentID = $this->idFromFixture('SiteTreeTest_Conflicted', 'parent'); @@ -693,8 +693,8 @@ class SiteTreeTest extends SapphireTest { } public function testURLSegmentMultiByte() { - $origAllow = URLSegmentFilter::$default_allow_multibyte; - URLSegmentFilter::$default_allow_multibyte = true; + $origAllow = Config::inst()->get('URLSegmentFilter', 'default_allow_multibyte'); + Config::inst()->update('URLSegmentFilter', 'default_allow_multibyte', true); $sitetree = new SiteTree(); $sitetree->write(); @@ -709,7 +709,7 @@ class SiteTreeTest extends SapphireTest { $sitetreeLive = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree"."ID" = ' .$sitetree->ID, false); $this->assertEquals($sitetreeLive->URLSegment, rawurlencode('brötchen')); - URLSegmentFilter::$default_allow_multibyte = $origAllow; + Config::inst()->update('URLSegmentFilter', 'default_allow_multibyte', $origAllow); } public function testVersionsAreCreated() { @@ -895,7 +895,7 @@ class SiteTreeTest_PageNode_Controller extends Page_Controller implements TestOn class SiteTreeTest_Conflicted extends Page implements TestOnly { } class SiteTreeTest_Conflicted_Controller extends Page_Controller implements TestOnly { - public static $allowed_actions = array ( + private static $allowed_actions = array ( 'conflicted-action' ); @@ -917,32 +917,32 @@ class SiteTreeTest_NullHtmlCleaner extends HTMLCleaner { class SiteTreeTest_ClassA extends Page implements TestOnly { - static $need_permission = array('ADMIN', 'CMS_ACCESS_CMSMain'); + private static $need_permission = array('ADMIN', 'CMS_ACCESS_CMSMain'); - static $allowed_children = array('SiteTreeTest_ClassB'); + private static $allowed_children = array('SiteTreeTest_ClassB'); } class SiteTreeTest_ClassB extends Page implements TestOnly { // Also allowed subclasses - static $allowed_children = array('SiteTreeTest_ClassC'); + private static $allowed_children = array('SiteTreeTest_ClassC'); } class SiteTreeTest_ClassC extends Page implements TestOnly { - static $allowed_children = array(); + private static $allowed_children = array(); } class SiteTreeTest_ClassD extends Page implements TestOnly { // Only allows this class, no children classes - static $allowed_children = array('*SiteTreeTest_ClassC'); + private static $allowed_children = array('*SiteTreeTest_ClassC'); } class SiteTreeTest_ClassCext extends SiteTreeTest_ClassC implements TestOnly { // Override SiteTreeTest_ClassC definitions - static $allowed_children = array('SiteTreeTest_ClassB'); + private static $allowed_children = array('SiteTreeTest_ClassB'); } class SiteTreeTest_NotRoot extends Page implements TestOnly { - static $can_be_root = false; + private static $can_be_root = false; } class SiteTreeTest_StageStatusInherit extends SiteTree implements TestOnly { diff --git a/tests/model/VirtualPageTest.php b/tests/model/VirtualPageTest.php index ad383454..695d81cb 100644 --- a/tests/model/VirtualPageTest.php +++ b/tests/model/VirtualPageTest.php @@ -1,7 +1,7 @@ origInitiallyCopiedFields = VirtualPage::$initially_copied_fields; - VirtualPage::$initially_copied_fields[] = 'MyInitiallyCopiedField'; - $this->origNonVirtualField = VirtualPage::$non_virtual_fields; - VirtualPage::$non_virtual_fields[] = 'MyNonVirtualField'; - VirtualPage::$non_virtual_fields[] = 'MySharedNonVirtualField'; + $this->origInitiallyCopiedFields = VirtualPage::config()->initially_copied_fields; + VirtualPage::config()->initially_copied_fields = array('MyInitiallyCopiedField'); + $this->origNonVirtualField = VirtualPage::config()->non_virtual_fields; + $nonVirtual = VirtualPage::config()->non_virtual_fields; + VirtualPage::config()->non_virtual_fields = array('MyNonVirtualField', 'MySharedNonVirtualField'); } public function tearDown() { parent::tearDown(); - VirtualPage::$initially_copied_fields = $this->origInitiallyCopiedFields; - VirtualPage::$non_virtual_fields = $this->origNonVirtualField; + VirtualPage::config()->initially_copied_fields = $this->origInitiallyCopiedFields; + VirtualPage::config()->non_virtual_fields = $this->origNonVirtualField; } /** @@ -579,36 +579,36 @@ class VirtualPageTest extends SapphireTest { class VirtualPageTest_ClassA extends Page implements TestOnly { - static $db = array( + private static $db = array( 'MyInitiallyCopiedField' => 'Text', 'MyVirtualField' => 'Text', 'MyNonVirtualField' => 'Text', ); - static $allowed_children = array('VirtualPageTest_ClassB'); + private static $allowed_children = array('VirtualPageTest_ClassB'); } class VirtualPageTest_ClassB extends Page implements TestOnly { - static $allowed_children = array('VirtualPageTest_ClassC'); + private static $allowed_children = array('VirtualPageTest_ClassC'); } class VirtualPageTest_ClassC extends Page implements TestOnly { - static $allowed_children = array(); + private static $allowed_children = array(); } class VirtualPageTest_NotRoot extends Page implements TestOnly { - static $can_be_root = false; + private static $can_be_root = false; } class VirtualPageTest_VirtualPageSub extends VirtualPage implements TestOnly { - static $db = array( + private static $db = array( 'MyProperty' => 'Varchar', ); } class VirtualPageTest_PageExtension extends DataExtension implements TestOnly { - static $db = array( + private static $db = array( // These fields are just on an extension to simulate shared properties between Page and VirtualPage. // Not possible through direct $db definitions due to VirtualPage inheriting from Page, and Page being defined elsewhere. 'MySharedVirtualField' => 'Text', diff --git a/tests/reports/SideReportTest.php b/tests/reports/SideReportTest.php index 3e12c1e1..1bd557dc 100644 --- a/tests/reports/SideReportTest.php +++ b/tests/reports/SideReportTest.php @@ -6,9 +6,9 @@ class SideReportTest extends SapphireTest { - static $fixture_file = 'SideReportTest.yml'; + protected static $fixture_file = 'SideReportTest.yml'; - static $daysAgo = 14; + private static $daysAgo = 14; public function setUp() { parent::setUp(); diff --git a/tests/search/CMSMainSearchFormTest.php b/tests/search/CMSMainSearchFormTest.php index 4577bea0..0de41ade 100644 --- a/tests/search/CMSMainSearchFormTest.php +++ b/tests/search/CMSMainSearchFormTest.php @@ -1,7 +1,7 @@ orig['domain_based_caching'] = FilesystemPublisher::$domain_based_caching; - FilesystemPublisher::$domain_based_caching = false; + Config::inst()->update('FilesystemPublisher', 'domain_based_caching', false); } public function tearDown() { @@ -27,8 +26,6 @@ class FilesystemPublisherTest extends SapphireTest { SiteTree::remove_extension("FilesystemPublisher('assets/FilesystemPublisherTest-static-folder/')"); - FilesystemPublisher::$domain_based_caching = $this->orig['domain_based_caching']; - if(file_exists(BASE_PATH . '/assets/FilesystemPublisherTest-static-folder')) { Filesystem::removeFolder(BASE_PATH . '/assets/FilesystemPublisherTest-static-folder'); } @@ -82,8 +79,7 @@ class FilesystemPublisherTest extends SapphireTest { } public function testUrlsToPathsWithDomainBasedCaching() { - $origDomainBasedCaching = FilesystemPublisher::$domain_based_caching; - FilesystemPublisher::$domain_based_caching = true; + Config::inst()->update('FilesystemPublisher', 'domain_based_caching', true); $fsp = new FilesystemPublisher('.', 'html'); @@ -107,8 +103,6 @@ class FilesystemPublisherTest extends SapphireTest { array($url => 'domain2.com/parent/child.html'), 'Nested URLsegment path mapping' ); - - FilesystemPublisher::$domain_based_caching = $origDomainBasedCaching; } /** @@ -134,7 +128,7 @@ 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(); + $default_theme= Config::inst()->get('SSViewer', 'theme'); $p1 = new Page(); $p1->URLSegment = strtolower(__CLASS__).'-page-1'; @@ -142,21 +136,13 @@ class FilesystemPublisherTest extends SapphireTest { $p1->write(); $p1->doPublish(); - $current_theme=SSViewer::current_custom_theme(); + $current_theme=Config::inst()->get('SSViewer', 'custom_theme'); $this->assertEquals($current_theme, $default_theme, 'After a standard publication, the theme is correct'); //The CMS sometimes sets the theme to null. Check that the $current_custom_theme is still the default - SSViewer::set_theme(null); - $current_theme=SSViewer::current_custom_theme(); + Config::inst()->update('SSViewer', 'theme', null); + $current_theme=Config::inst()->get('SSViewer', 'custom_theme'); $this->assertEquals($current_theme, $default_theme, 'After a setting the theme to null, the default 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(); - $this->assertNotEquals($current_theme, $default_theme, 'The static publisher theme overrides the custom theme'); - - } function testPublishPages() { diff --git a/tests/tasks/MigrateSiteTreeLinkingTaskTest.php b/tests/tasks/MigrateSiteTreeLinkingTaskTest.php index 5547a98f..537d2467 100644 --- a/tests/tasks/MigrateSiteTreeLinkingTaskTest.php +++ b/tests/tasks/MigrateSiteTreeLinkingTaskTest.php @@ -5,9 +5,9 @@ */ class MigrateSiteTreeLinkingTaskTest extends SapphireTest { - public static $fixture_file = 'MigrateSiteTreeLinkingTaskTest.yml'; + protected static $fixture_file = 'MigrateSiteTreeLinkingTaskTest.yml'; - public static $use_draft_site = true; + protected static $use_draft_site = true; public function testLinkingMigration() { ob_start(); diff --git a/tests/tasks/RemoveOrphanedPagesTaskTest.php b/tests/tasks/RemoveOrphanedPagesTaskTest.php index 7b09b7f7..e5b4948f 100644 --- a/tests/tasks/RemoveOrphanedPagesTaskTest.php +++ b/tests/tasks/RemoveOrphanedPagesTaskTest.php @@ -32,9 +32,9 @@ */ class RemoveOrphanedPagesTaskTest extends FunctionalTest { - static $fixture_file = 'RemoveOrphanedPagesTaskTest.yml'; + protected static $fixture_file = 'RemoveOrphanedPagesTaskTest.yml'; - static $use_draft_site = false; + protected static $use_draft_site = false; public function setUp() { parent::setUp();