Page MenuHomePhabricator

raw-paste-data.txt

Authored By
Urbanecm_WMF
Nov 23 2021, 10:29 PM
Size
1 KB
Referenced Files
None
Subscribers
None

raw-paste-data.txt

urbanecm@notebook ~/unsynced/gerrit/mediawiki/extensions/GrowthExperiments
$ git diff
diff --git a/tests/phpunit/integration/NewcomerTasks/ImageRecommendationFilterTest.php b/tests/phpunit/integration/NewcomerTasks/ImageRecommendationFilterTest.php
index 6ed4458a..215f94cd 100644
--- a/tests/phpunit/integration/NewcomerTasks/ImageRecommendationFilterTest.php
+++ b/tests/phpunit/integration/NewcomerTasks/ImageRecommendationFilterTest.php
@@ -36,7 +36,19 @@ class ImageRecommendationFilterTest extends MediaWikiIntegrationTestCase {
public function testFilter() {
$taskSet = $this->getDefaultTaskSet();
- $wanObjectCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ // We need a WAN cache for this.
+ global $wgWANObjectCaches;
+ $this->setMwGlobals( [
+ 'wgMainWANCache' => 'hash',
+ 'wgWANObjectCaches' => $wgWANObjectCaches + [
+ 'hash' => [
+ 'class' => WANObjectCache::class,
+ 'cacheId' => 'hash',
+ 'channels' => []
+ ]
+ ]
+ ] );
+ $wanObjectCache = $this->getServiceContainer()->getMainWANObjectCache();
$wanObjectCache->set(
ImageRecommendationFilter::makeKey( $wanObjectCache, 'image-recommendation', 'Task3' ),
true
urbanecm@notebook ~/unsynced/gerrit/mediawiki/extensions/GrowthExperiments
$

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9251857
Default Alt Text
raw-paste-data.txt (1 KB)

Event Timeline