]> 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 4530ff1c025b16dedbf54d624bfdc0cbe9751846..0a3dba439d83ace9f5b254667e06d73e50de131f 100644 (file)
@@ -6,16 +6,21 @@ namespace Friendica\Test\src\Core\Cache;
 use Friendica\Core\Cache\CacheDriverFactory;
 
 /**
- * @runTestsInSeparateProcesses
- * @preserveGlobalState disabled
  * @requires extension redis
  */
 class RedisCacheDriverTest extends MemoryCacheTest
 {
        protected function getInstance()
        {
-               $this->mockConfigGet('system', 'redis_host', 'localhost', 1);
-               $this->mockConfigGet('system', 'redis_port', null, 1);
+               $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;