]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Cache/RedisCacheDriverTest.php
Refactor ConfigMockTrait to mocked ConfigCache
[friendica.git] / tests / src / Core / Cache / RedisCacheDriverTest.php
index 17079f1e0699c6f7476b5be997678979a8788e4f..0a3dba439d83ace9f5b254667e06d73e50de131f 100644 (file)
@@ -3,10 +3,6 @@
 
 namespace Friendica\Test\src\Core\Cache;
 
-/**
- * @runTestsInSeparateProcesses
- * @preserveGlobalState disabled
- */
 use Friendica\Core\Cache\CacheDriverFactory;
 
 /**
@@ -16,6 +12,16 @@ class RedisCacheDriverTest extends MemoryCacheTest
 {
        protected function getInstance()
        {
+               $this->configCache
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_host', NULL)
+                       ->andReturn('localhost');
+
+               $this->configCache
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_port', NULL)
+                       ->andReturn(null);
+
                $this->cache = CacheDriverFactory::create('redis');
                return $this->cache;
        }