$store = new CachingSiteStore(
$this->getHashSiteStore( $testSites ),
- wfGetMainCache()
+ ObjectCache::getLocalClusterInstance()
);
$sites = $store->getSites();
* @covers CachingSiteStore::saveSites
*/
public function testSaveSites() {
- $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+ $store = new CachingSiteStore(
+ new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+ );
$sites = [];
return $siteList;
} ) );
- $store = new CachingSiteStore( $dbSiteStore, wfGetMainCache() );
+ $store = new CachingSiteStore( $dbSiteStore, ObjectCache::getLocalClusterInstance() );
// initialize internal cache
$this->assertGreaterThan( 0, $store->getSites()->count(), 'count sites' );
* @covers CachingSiteStore::clear
*/
public function testClear() {
- $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+ $store = new CachingSiteStore(
+ new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+ );
$this->assertTrue( $store->clear() );
$site = $store->getSite( 'enwiki' );
$wgParserCacheType = CACHE_NONE;
DeferredUpdates::clearPendingUpdates();
- $wgMemc = wfGetMainCache();
+ $wgMemc = ObjectCache::getLocalClusterInstance();
$messageMemc = wfGetMessageCacheStorage();
RequestContext::resetMain();