Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34764112
raw-paste-data.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Urbanecm_WMF
Nov 23 2021, 10:29 PM
2021-11-23 22:29:25 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
raw-paste-data.txt
View Options
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
Details
Attached
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)
Attached To
Mode
P17803 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment