mirror of
https://github.com/friendica/friendica
synced 2025-03-01 06:28:26 +00:00
- Reducing DB-dependencies - Creating DB-cache mocks - Creating DB-lock mocks - Switching to mocked dependencies for Cache/Lock/App
29 lines
579 B
PHP
29 lines
579 B
PHP
<?php
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
/**
|
|
* @runTestsInSeparateProcesses
|
|
* @preserveGlobalState disabled
|
|
* @requires extension redis
|
|
*/
|
|
class RedisCacheDriverTest extends MemoryCacheTest
|
|
{
|
|
protected function getInstance()
|
|
{
|
|
$this->mockConfigGet('system', 'redis_host', 'localhost', 1);
|
|
$this->mockConfigGet('system', 'redis_port', null, 1);
|
|
|
|
$this->cache = CacheDriverFactory::create('redis');
|
|
return $this->cache;
|
|
}
|
|
|
|
public function tearDown()
|
|
{
|
|
$this->cache->clear(false);
|
|
parent::tearDown();
|
|
}
|
|
}
|