]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/RedisCacheLockDriverTest.php
Merge pull request #7417 from nupplaphil/task/app_dependencies
[friendica.git] / tests / src / Core / Lock / RedisCacheLockDriverTest.php
index e537e50c1054d03f842b01cd4cb2b202193eb9eb..21bace501822e631010beb0c83f6878a958be6ec 100644 (file)
@@ -3,19 +3,36 @@
 
 namespace Friendica\Test\src\Core\Lock;
 
-use Friendica\Core\Cache\CacheDriverFactory;
 use Friendica\Core\Lock\CacheLockDriver;
+use Friendica\Factory\CacheDriverFactory;
 
 /**
  * @requires extension redis
- * @runTestsInSeparateProcesses
- * @preserveGlobalState disabled
  */
 class RedisCacheLockDriverTest extends LockTest
 {
        protected function getInstance()
        {
-               return new CacheLockDriver(CacheDriverFactory::create('redis'));
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_host')
+                       ->andReturn('localhost');
+
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_port')
+                       ->andReturn(null);
+
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_db')
+                       ->andReturn(3);
 
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_password')
+                       ->andReturn(null);
+
+               return new CacheLockDriver(CacheDriverFactory::create('redis'));
        }
 }