mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Reset the LocalClusterObjectCache service in tests
Change-Id: I0886e749dee19d729bcd4f398d65b78aa22a8065
This commit is contained in:
parent
103c0831f6
commit
1cf32cf036
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue