3 namespace Friendica\Test\src\Core\Cache;
5 use Friendica\Core\Cache\MemcacheCache;
6 use Friendica\Core\Config\Configuration;
9 * @requires extension memcache
11 class MemcacheCacheTest extends MemoryCacheTest
13 protected function getInstance()
15 $configMock = \Mockery::mock(Configuration::class);
17 $host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
20 ->shouldReceive('get')
21 ->with('system', 'memcache_host')
24 ->shouldReceive('get')
25 ->with('system', 'memcache_port')
29 $this->cache = new MemcacheCache($host, $configMock);
30 } catch (\Exception $e) {
31 $this->markTestSkipped('Memcache is not available');
36 public function tearDown()
38 $this->cache->clear(false);