mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 00:54:26 +02:00
- Reducing DB-dependencies - Creating DB-cache mocks - Creating DB-lock mocks - Switching to mocked dependencies for Cache/Lock/App
28 lines
550 B
PHP
28 lines
550 B
PHP
<?php
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
/**
|
|
* @runTestsInSeparateProcesses
|
|
* @preserveGlobalState disabled
|
|
* @requires extension memcached
|
|
*/
|
|
class MemcachedCacheDriverTest extends MemoryCacheTest
|
|
{
|
|
protected function getInstance()
|
|
{
|
|
$this->mockConfigGet('system', 'memcached_hosts', [0 => 'localhost, 11211']);
|
|
|
|
$this->cache = CacheDriverFactory::create('memcached');
|
|
return $this->cache;
|
|
}
|
|
|
|
public function tearDown()
|
|
{
|
|
$this->cache->clear(false);
|
|
parent::tearDown();
|
|
}
|
|
}
|