Merge "mail: Refactor checks looking for PEAR libraries to be clearer"
[lhc/web/wiklou.git] / tests / phpunit / includes / SiteStatsTest.php
index ea476a7..a6a92c6 100644 (file)
@@ -6,9 +6,8 @@ class SiteStatsTest extends MediaWikiTestCase {
         * @covers SiteStats::jobs
         */
        function testJobsCountGetCached() {
-               $this->setService( 'MainWANObjectCache',
-                       new WANObjectCache( [ 'cache' => new HashBagOStuff() ] ) );
-               $cache = \MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache();
+               $cache = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] );
+               $this->setService( 'MainWANObjectCache', $cache );
                $jobq = JobQueueGroup::singleton();
 
                $jobq->push( new NullJob( Title::newMainPage(), [] ) );