2018-07-07 18:07:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Cache;
|
|
|
|
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
/**
|
|
|
|
* @requires extension memcache
|
|
|
|
*/
|
2018-07-07 18:35:42 +00:00
|
|
|
class MemcacheCacheDriverTest extends MemoryCacheTest
|
2018-07-07 18:07:07 +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', 'memcache_host')
|
2019-02-07 19:44:03 +00:00
|
|
|
->andReturn('localhost');
|
|
|
|
|
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', 'memcache_port')
|
2019-02-07 19:44:03 +00:00
|
|
|
->andReturn(11211);
|
2019-01-30 19:26:17 +00:00
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache = CacheDriverFactory::create('memcache');
|
|
|
|
return $this->cache;
|
|
|
|
|
2018-07-07 18:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
2018-07-18 19:04:18 +00:00
|
|
|
$this->cache->clear(false);
|
2018-07-07 18:07:07 +00:00
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
}
|