Refactoring DBA-mocking tests

- Reducing DB-dependencies
- Creating DB-cache mocks
- Creating DB-lock mocks
- Switching to mocked dependencies for Cache/Lock/App
This commit is contained in:
Philipp Holzer 2019-01-30 20:26:17 +01:00
parent f7e95f65b1
commit 433d6abe8c
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
21 changed files with 848 additions and 193 deletions

View file

@ -3,19 +3,20 @@
namespace Friendica\Test\src\Core\Cache;
/**
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*/
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;
}