From 54026190a173275d845b24b40ce4ad278c7ff7f1 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 6 Mar 2011 23:15:10 +0000 Subject: [PATCH] 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. --- tests/phpunit/MediaWikiTestCase.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 08f9323831..8e3d215486 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -30,12 +30,11 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } function run( PHPUnit_Framework_TestResult $result = NULL ) { - global $wgCaches; /* Some functions require some kind of caching, and will end up using the db, * which we can't allow, as that would open a new connection for mysql. * Replace with a HashBag. They would not be going to persist anyway. */ - $wgCaches[CACHE_DB] = new HashBagOStuff; + ObjectCache::$instances[CACHE_DB] = new HashBagOStuff; if( $this->needsDB() ) { -- 2.20.1