]> 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 460c1184ba47b5d2c684c8996b9424c43edd69de..0a3dba439d83ace9f5b254667e06d73e50de131f 100644 (file)
@@ -3,7 +3,6 @@
 
 namespace Friendica\Test\src\Core\Cache;
 
-
 use Friendica\Core\Cache\CacheDriverFactory;
 
 /**
@@ -11,13 +10,18 @@ use Friendica\Core\Cache\CacheDriverFactory;
  */
 class RedisCacheDriverTest extends MemoryCacheTest
 {
-       /**
-        * @var \Friendica\Core\Cache\IMemoryCacheDriver
-        */
-       private $cache;
-
        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;
        }