r87126 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87125‎ | r87126 | r87127 >
Date:16:26, 29 April 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
The $wgLocalisationCacheConf was being overwritten by the default value.
Restores the ability to run databaseless tests broken by r86775
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)
  • /trunk/phase3/tests/phpunit/phpunit.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -35,7 +35,7 @@
3636 * Replace with a HashBag. They would not be going to persist anyway.
3737 */
3838 ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;
39 -
 39+
4040 if( $this->needsDB() ) {
4141
4242 global $wgDBprefix;
Index: trunk/phase3/tests/phpunit/phpunit.php
@@ -22,11 +22,18 @@
2323 parent::finalSetup();
2424
2525 global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, $wgUseDatabaseMessages;
 26+ global $wgLocaltimezone, $wgLocalisationCacheConf;
2627
2728 $wgMainCacheType = CACHE_NONE;
2829 $wgMessageCacheType = CACHE_NONE;
2930 $wgParserCacheType = CACHE_NONE;
 31+
3032 $wgUseDatabaseMessages = false; # Set for future resets
 33+
 34+ // Assume UTC for testing purposes
 35+ $wgLocaltimezone = 'UTC';
 36+
 37+ $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
3138 }
3239 public function execute() { }
3340 public function getDbType() {
@@ -37,11 +44,6 @@
3845 $maintClass = 'PHPUnitMaintClass';
3946 require( RUN_MAINTENANCE_IF_MAIN );
4047
41 -// Assume UTC for testing purposes
42 -$wgLocaltimezone = 'UTC';
43 -
44 -$wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
45 -
4648 if( !in_array( '--configuration', $_SERVER['argv'] ) ) {
4749 //Hack to eliminate the need to use the Makefile (which sucks ATM)
4850 $_SERVER['argv'][] = '--configuration';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86775Stop stubbing $wgLang and $wgContLang. There are no major code paths which d...happy-melon15:19, 23 April 2011

Comments

#Comment by Happy-melon (talk | contribs)   16:45, 29 April 2011

Thanks for fixing this.

Status & tagging log