2018-07-07 17:46:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
/**
|
2019-01-30 19:26:17 +00:00
|
|
|
* @runTestsInSeparateProcesses
|
|
|
|
* @preserveGlobalState disabled
|
2018-07-18 19:04:18 +00:00
|
|
|
* @requires extension redis
|
|
|
|
*/
|
2018-07-07 18:35:42 +00:00
|
|
|
class RedisCacheDriverTest extends MemoryCacheTest
|
2018-07-07 17:46:16 +00:00
|
|
|
{
|
|
|
|
protected function getInstance()
|
|
|
|
{
|
2019-01-30 19:26:17 +00:00
|
|
|
$this->mockConfigGet('system', 'redis_host', 'localhost', 1);
|
|
|
|
$this->mockConfigGet('system', 'redis_port', null, 1);
|
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache = CacheDriverFactory::create('redis');
|
|
|
|
return $this->cache;
|
2018-07-07 17:46:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache->clear(false);
|
2018-07-07 17:46:16 +00:00
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
}
|