]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/RedisCacheLockDriverTest.php
Merge branch '2019.06-rc'
[friendica.git] / tests / src / Core / Lock / RedisCacheLockDriverTest.php
index 765055add0ad7fe5783e7eee7edf96358ab59f52..21bace501822e631010beb0c83f6878a958be6ec 100644 (file)
@@ -3,20 +3,35 @@
 
 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()
        {
-               $this->mockConfigGet('system', 'redis_host', 'localhost', 1);
-               $this->mockConfigGet('system', 'redis_port', null, 1);
+               $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'));
        }