433d6abe8c
- Reducing DB-dependencies - Creating DB-cache mocks - Creating DB-lock mocks - Switching to mocked dependencies for Cache/Lock/App
31 lines
596 B
PHP
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();
|
|
}
|
|
}
|