2018-07-07 17:46:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
|
2019-03-03 14:34:07 +00:00
|
|
|
use Friendica\Factory\CacheDriverFactory;
|
2018-07-07 17:46:16 +00:00
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
/**
|
|
|
|
* @requires extension memcached
|
|
|
|
*/
|
2018-07-07 18:35:42 +00:00
|
|
|
class MemcachedCacheDriverTest extends MemoryCacheTest
|
2018-07-07 17:46:16 +00:00
|
|
|
{
|
|
|
|
protected function getInstance()
|
|
|
|
{
|
2019-02-17 20:41:45 +00:00
|
|
|
$this->configMock
|
2019-02-07 19:44:03 +00:00
|
|
|
->shouldReceive('get')
|
2019-02-17 20:41:45 +00:00
|
|
|
->with('system', 'memcached_hosts')
|
2019-02-07 19:44:03 +00:00
|
|
|
->andReturn([0 => 'localhost, 11211']);
|
2019-01-30 19:26:17 +00:00
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache = CacheDriverFactory::create('memcached');
|
|
|
|
return $this->cache;
|
2018-07-07 17:46:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache->clear(false);
|
2018-07-07 17:46:16 +00:00
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
}
|