mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-25 00:26:06 +00:00
Merge "Reset the LocalClusterObjectCache service in tests"
This commit is contained in:
commit
0f52eaaff5
|
@ -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