* @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(), [] ) );