Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/308444
Change subject: Reset the LocalClusterObjectCache service in tests
......................................................................
Reset the LocalClusterObjectCache service in tests
Change-Id: If5df8ebfb33b762d46cb1e7ed8b6a0360281ce04
---
M repo/tests/phpunit/includes/EditEntityTest.php
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/44/308444/1
diff --git a/repo/tests/phpunit/includes/EditEntityTest.php
b/repo/tests/phpunit/includes/EditEntityTest.php
index 9f3879b..ca274bb 100644
--- a/repo/tests/phpunit/includes/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/EditEntityTest.php
@@ -689,6 +689,13 @@
// make sure nobody else has to work with our cache
ObjectCache::clear();
+ $services = \MediaWiki\MediaWikiServices::getInstance();
+ if ( method_exists( $services, 'getLocalClusterObjectCache' ) )
{
+ $services->resetServiceForTesting(
'LocalClusterObjectCache' );
+ $services->redefineService( 'LocalClusterObjectCache',
function () {
+ return new \HashBagOStuff();
+ } );
+ }
}
public function provideIsTokenOk() {
--
To view, visit https://gerrit.wikimedia.org/r/308444
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5df8ebfb33b762d46cb1e7ed8b6a0360281ce04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits