2018-07-07 13:46:16 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
|
|
|
|
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
|
2018-07-18 15:04:18 -04:00
|
|
|
/**
|
|
|
|
* @requires extension memcached
|
|
|
|
*/
|
2018-07-07 14:35:42 -04:00
|
|
|
class MemcachedCacheDriverTest extends MemoryCacheTest
|
2018-07-07 13:46:16 -04:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \Friendica\Core\Cache\IMemoryCacheDriver
|
|
|
|
*/
|
|
|
|
private $cache;
|
|
|
|
|
|
|
|
protected function getInstance()
|
|
|
|
{
|
2018-07-18 15:04:18 -04:00
|
|
|
$this->cache = CacheDriverFactory::create('memcached');
|
|
|
|
return $this->cache;
|
2018-07-07 13:46:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
2018-07-18 15:04:18 -04:00
|
|
|
$this->cache->clear(false);
|
2018-07-07 13:46:16 -04:00
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
}
|