Merge "Reset the LocalClusterObjectCache service in tests"

This commit is contained in:
jenkins-bot 2016-09-13 23:51:20 +00:00 committed by Gerrit Code Review
commit 0f52eaaff5

View file

@ -23,7 +23,12 @@ class CaptchaPreAuthenticationProviderTest extends MediaWikiTestCase {
] );
CaptchaStore::unsetInstanceForTests();
CaptchaStore::get()->clearAll();
ObjectCache::$instances[__METHOD__] = new HashBagOStuff();
$services = \MediaWiki\MediaWikiServices::getInstance();
if ( method_exists( $services, 'getLocalClusterObjectCache' ) ) {
$this->setService( 'LocalClusterObjectCache', new HashBagOStuff() );
} else {
ObjectCache::$instances[__METHOD__] = new HashBagOStuff();
}
}
public function tearDown() {