]> 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 0ee73945b9620ac68b3bdd16f201dce67080624d..0a3dba439d83ace9f5b254667e06d73e50de131f 100644 (file)
@@ -3,7 +3,6 @@
 
 namespace Friendica\Test\src\Core\Cache;
 
-
 use Friendica\Core\Cache\CacheDriverFactory;
 
 /**
@@ -13,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;
        }