4 namespace Friendica\Test\src\Core\Cache;
6 use Friendica\Core\Cache\RedisCache;
7 use Friendica\Core\Config\Configuration;
10 * @requires extension redis
12 class RedisCacheTest extends MemoryCacheTest
14 protected function getInstance()
16 $configMock = \Mockery::mock(Configuration::class);
19 ->shouldReceive('get')
20 ->with('system', 'redis_host')
21 ->andReturn('localhost');
23 ->shouldReceive('get')
24 ->with('system', 'redis_port')
28 ->shouldReceive('get')
29 ->with('system', 'redis_db', 0)
32 ->shouldReceive('get')
33 ->with('system', 'redis_password')
36 $this->cache = new RedisCache('localhost', $configMock);
40 public function tearDown()
42 $this->cache->clear(false);