friendica/tests/src/Core/Cache/RedisCacheDriverTest.php

35 lines
605 B
PHP
Raw Normal View History

<?php
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\CacheDriverFactory;
/**
* @requires extension redis
*/
2018-07-07 20:35:42 +02:00
class RedisCacheDriverTest extends MemoryCacheTest
{
protected function getInstance()
{
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'redis_host')
->andReturn('localhost');
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'redis_port')
->andReturn(null);
$this->cache = CacheDriverFactory::create('redis');
return $this->cache;
}
public function tearDown()
{
$this->cache->clear(false);
parent::tearDown();
}
}