aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/objectcache/ObjectCacheTest.php
diff options
context:
space:
mode:
authorIrina Balaban <ibalaban@fandom.com>2024-05-05 11:33:19 +0300
committerIrina Balaban <ibalaban@fandom.com>2024-05-05 12:40:30 +0300
commitdc989f680f583c9a1aa32175f537183b6fee6610 (patch)
treee96b1d7fb51162d96098a455f150956d5a795456 /tests/phpunit/includes/objectcache/ObjectCacheTest.php
parentb074b829aeffe832713a6846e7ebe67f477c1bce (diff)
downloadmediawikicore-dc989f680f583c9a1aa32175f537183b6fee6610.tar.gz
mediawikicore-dc989f680f583c9a1aa32175f537183b6fee6610.zip
fix: use objectcachefactory methods instead of deprecated objectcache methods
Bug: T363770 Change-Id: Ie732f6925ec2b1316a60bebbe3c27f963c9dacb1
Diffstat (limited to 'tests/phpunit/includes/objectcache/ObjectCacheTest.php')
-rw-r--r--tests/phpunit/includes/objectcache/ObjectCacheTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheTest.php b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
index 1a3358814140..9713cffa6556 100644
--- a/tests/phpunit/includes/objectcache/ObjectCacheTest.php
+++ b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
@@ -43,7 +43,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
public function testNewAnythingNothing() {
$this->assertInstanceOf(
SqlBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'No available types. Fallback to DB'
);
}
@@ -53,7 +53,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf(
HashBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'Use an available type (hash)'
);
}
@@ -63,7 +63,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf(
HashBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'Use an available type (CACHE_ACCEL)'
);
}
@@ -75,7 +75,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf(
SqlBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'Fallback to DB if available types fall back to Empty'
);
}
@@ -91,7 +91,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf(
EmptyBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'Fallback to none if available types and DB are unavailable'
);
}
@@ -101,7 +101,7 @@ class ObjectCacheTest extends MediaWikiIntegrationTestCase {
$this->assertInstanceOf(
EmptyBagOStuff::class,
- ObjectCache::newAnything(),
+ $this->getServiceContainer()->getObjectCacheFactory()->getInstance( ObjectCache::getAnythingId() ),
'No available types or DB. Fallback to none.'
);
}