4 namespace Friendica\Test\src\Core\Lock;
6 use Friendica\Core\Cache\RedisCache;
7 use Friendica\Core\Config\Configuration;
8 use Friendica\Core\Lock\CacheLock;
11 * @requires extension redis
13 class RedisCacheLockTest extends LockTest
15 protected function getInstance()
17 $configMock = \Mockery::mock(Configuration::class);
20 ->shouldReceive('get')
21 ->with('system', 'redis_host')
22 ->andReturn('localhost');
24 ->shouldReceive('get')
25 ->with('system', 'redis_port')
29 ->shouldReceive('get')
30 ->with('system', 'redis_db', 0)
33 ->shouldReceive('get')
34 ->with('system', 'redis_password')
37 return new CacheLock(new RedisCache('localhost', $configMock));