friendica/tests/src/Core/Cache/MemcacheCacheDriverTest.php
Philipp Holzer 433d6abe8c
Refactoring DBA-mocking tests
- Reducing DB-dependencies
- Creating DB-cache mocks
- Creating DB-lock mocks
- Switching to mocked dependencies for Cache/Lock/App
2019-02-02 19:03:15 +01:00

31 lines
596 B
PHP

<?php
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\CacheDriverFactory;
/**
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @requires extension memcache
*/
class MemcacheCacheDriverTest extends MemoryCacheTest
{
protected function getInstance()
{
$this->mockConfigGet('system', 'memcache_host', 'localhost', 1);
$this->mockConfigGet('system', 'memcache_port', 11211, 1);
$this->cache = CacheDriverFactory::create('memcache');
return $this->cache;
}
public function tearDown()
{
$this->cache->clear(false);
parent::tearDown();
}
}