4 namespace Friendica\Test\src\Core\Cache;
6 use Friendica\Core\Cache\MemcachedCache;
7 use Friendica\Core\Config\Configuration;
8 use Psr\Log\NullLogger;
11 * @requires extension memcached
13 class MemcachedCacheTest extends MemoryCacheTest
15 protected function getInstance()
17 $configMock = \Mockery::mock(Configuration::class);
20 ->shouldReceive('get')
21 ->with('system', 'memcached_hosts')
22 ->andReturn([0 => 'localhost, 11211']);
24 $logger = new NullLogger();
26 $this->cache = new MemcachedCache('localhost', $configMock, $logger);
30 public function tearDown()
32 $this->cache->clear(false);