namespace Friendica\Test\src\Core\Lock;
-
-use Friendica\Core\Cache\CacheDriverFactory;
+use Friendica\Factory\CacheDriverFactory;
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'));
}
}