diff options
author | Robin Appelman <robin@icewind.nl> | 2024-08-20 16:46:49 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2024-08-28 10:18:52 +0200 |
commit | c58bdbf378a6c2abc6b9f33dae175de762f33d8a (patch) | |
tree | 11475757594cd974535ac6d9ea0c77193143166d /tests | |
parent | 114db0558c7093b6a07707035c6a62c9a8bec220 (diff) | |
download | nextcloud-server-c58bdbf378a6c2abc6b9f33dae175de762f33d8a.tar.gz nextcloud-server-c58bdbf378a6c2abc6b9f33dae175de762f33d8a.zip |
fix: delay calculating global cache prefix untill a cache is created
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Memcache/FactoryTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php index 5a1509eb3d9..b973b5065ea 100644 --- a/tests/lib/Memcache/FactoryTest.php +++ b/tests/lib/Memcache/FactoryTest.php @@ -110,7 +110,7 @@ class FactoryTest extends \Test\TestCase { $expectedLocalCache, $expectedDistributedCache, $expectedLockingCache) { $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); $profiler = $this->getMockBuilder(IProfiler::class)->getMock(); - $factory = new \OC\Memcache\Factory('abc', $logger, $profiler, $localCache, $distributedCache, $lockingCache); + $factory = new \OC\Memcache\Factory(fn () => 'abc', $logger, $profiler, $localCache, $distributedCache, $lockingCache); $this->assertTrue(is_a($factory->createLocal(), $expectedLocalCache)); $this->assertTrue(is_a($factory->createDistributed(), $expectedDistributedCache)); $this->assertTrue(is_a($factory->createLocking(), $expectedLockingCache)); @@ -124,13 +124,13 @@ class FactoryTest extends \Test\TestCase { $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); $profiler = $this->getMockBuilder(IProfiler::class)->getMock(); - new \OC\Memcache\Factory('abc', $logger, $profiler, $localCache, $distributedCache); + new \OC\Memcache\Factory(fn () => 'abc', $logger, $profiler, $localCache, $distributedCache); } public function testCreateInMemory(): void { $logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); $profiler = $this->getMockBuilder(IProfiler::class)->getMock(); - $factory = new \OC\Memcache\Factory('abc', $logger, $profiler, null, null, null); + $factory = new \OC\Memcache\Factory(fn () => 'abc', $logger, $profiler, null, null, null); $cache = $factory->createInMemory(); $cache->set('test', 48); |