r82867 converted $wgCaches into a class instance. Update the parsertests.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 6 Mar 2011 23:15:10 +0000 (23:15 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 6 Mar 2011 23:15:10 +0000 (23:15 +0000)
This faking is needed to avoid Table 'unittest_objectcache' doesn't exist errors when using temporary tables.

tests/phpunit/MediaWikiTestCase.php

index 08f9323..8e3d215 100644 (file)
@@ -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() ) {