The $wgLocalisationCacheConf was being overwritten by the default value.
authorPlatonides <platonides@users.mediawiki.org>
Fri, 29 Apr 2011 16:26:20 +0000 (16:26 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 29 Apr 2011 16:26:20 +0000 (16:26 +0000)
Restores the ability to run databaseless tests broken by r86775

tests/phpunit/MediaWikiTestCase.php
tests/phpunit/phpunit.php

index 8e3d215..0bf04aa 100644 (file)
@@ -35,7 +35,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                 * Replace with a HashBag. They would not be going to persist anyway.
                 */
                ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;
-                  
+
                if( $this->needsDB() ) {
                
                        global $wgDBprefix;
index e9381eb..7acc79c 100755 (executable)
@@ -22,11 +22,18 @@ class PHPUnitMaintClass extends Maintenance {
                parent::finalSetup();
 
                global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages;
+               global $wgLocaltimezone, $wgLocalisationCacheConf;
 
                $wgMainCacheType = CACHE_NONE;
                $wgMessageCacheType = CACHE_NONE;
                $wgParserCacheType = CACHE_NONE;
+
                $wgUseDatabaseMessages = false; # Set for future resets
+
+               // Assume UTC for testing purposes
+               $wgLocaltimezone = 'UTC';
+
+               $wgLocalisationCacheConf['storeClass'] =  'LCStore_Null';
        }
        public function execute() { }
        public function getDbType() {
@@ -37,11 +44,6 @@ class PHPUnitMaintClass extends Maintenance {
 $maintClass = 'PHPUnitMaintClass';
 require( RUN_MAINTENANCE_IF_MAIN );
 
-// Assume UTC for testing purposes
-$wgLocaltimezone = 'UTC';
-
-$wgLocalisationCacheConf['storeClass'] =  'LCStore_Null';
-
 if( !in_array( '--configuration', $_SERVER['argv'] ) ) {
        //Hack to eliminate the need to use the Makefile (which sucks ATM)
        $_SERVER['argv'][] = '--configuration';