]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/RedisCacheLockDriverTest.php
Bugfix ConfigCacheLoaderTest
[friendica.git] / tests / src / Core / Lock / RedisCacheLockDriverTest.php
index eaafbf4e443007e505c55f474f7a8c67a978d232..d21f3b6d8621dd1d9134780f7bf928d9a2f5b450 100644 (file)
@@ -3,8 +3,7 @@
 
 namespace Friendica\Test\src\Core\Lock;
 
-
-use Friendica\Core\Cache\CacheDriverFactory;
+use Friendica\Factory\CacheDriverFactory;
 use Friendica\Core\Lock\CacheLockDriver;
 
 /**
@@ -12,21 +11,18 @@ use Friendica\Core\Lock\CacheLockDriver;
  */
 class RedisCacheLockDriverTest extends LockTest
 {
-       /**
-        * @var \Friendica\Core\Cache\IMemoryCacheDriver
-        */
-       private $cache;
-
        protected function getInstance()
        {
-               $this->cache = CacheDriverFactory::create('redis');
-               return new CacheLockDriver($this->cache);
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_host')
+                       ->andReturn('localhost');
 
-       }
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'redis_port')
+                       ->andReturn(null);
 
-       public function tearDown()
-       {
-               $this->cache->clear();
-               parent::tearDown();
+               return new CacheLockDriver(CacheDriverFactory::create('redis'));
        }
 }