diff options
author | Irina Balaban <ibalaban@fandom.com> | 2024-05-05 11:33:19 +0300 |
---|---|---|
committer | Irina Balaban <ibalaban@fandom.com> | 2024-05-05 12:40:30 +0300 |
commit | dc989f680f583c9a1aa32175f537183b6fee6610 (patch) | |
tree | e96b1d7fb51162d96098a455f150956d5a795456 /tests/phpunit/includes/objectcache/ObjectCacheTest.php | |
parent | b074b829aeffe832713a6846e7ebe67f477c1bce (diff) | |
download | mediawikicore-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.php | 12 |
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.' ); } |