r83418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83417‎ | r83418 | r83419 >
Date:23:15, 6 March 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
r82867 converted $wgCaches into a class instance. Update the parsertests.
This faking is needed to avoid Table 'unittest_objectcache' doesn't exist errors when using temporary tables.
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -30,12 +30,11 @@
3131 }
3232
3333 function run( PHPUnit_Framework_TestResult $result = NULL ) {
34 - global $wgCaches;
3534 /* Some functions require some kind of caching, and will end up using the db,
3635 * which we can't allow, as that would open a new connection for mysql.
3736 * Replace with a HashBag. They would not be going to persist anyway.
3837 */
39 - $wgCaches[CACHE_DB] = new HashBagOStuff;
 38+ ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;
4039
4140 if( $this->needsDB() ) {
4241

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83140* Rewrote ObjectCache.php to conform to the modern coding style, and to be le...tstarling09:37, 3 March 2011

Comments

#Comment by Platonides (talk | contribs)   23:21, 6 March 2011

That should have read r83140, not r82867.

#Comment by Brion VIBBER (talk | contribs)   21:12, 8 April 2011

I think this code needs to be copied into parserTest.inc as well (cf bugzilla:15892) but as I'm not sure the status of migration between backends, I don't want to mess with it without checking.

#Comment by Hashar (talk | contribs)   18:57, 6 June 2011

wrongly marked ok. Still need review.

Status & tagging log