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,8 +23,13 @@ class CaptchaPreAuthenticationProviderTest extends MediaWikiTestCase {
|
|||
] );
|
||||
CaptchaStore::unsetInstanceForTests();
|
||||
CaptchaStore::get()->clearAll();
|
||||
$services = \MediaWiki\MediaWikiServices::getInstance();
|
||||
if ( method_exists( $services, 'getLocalClusterObjectCache' ) ) {
|
||||
$this->setService( 'LocalClusterObjectCache', new HashBagOStuff() );
|
||||
} else {
|
||||
ObjectCache::$instances[__METHOD__] = new HashBagOStuff();
|
||||
}
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
|
|
Loading…
Reference in a new issue