3 namespace Friendica\Test\src\Core\Cache;
5 use Friendica\Core\Cache\MemcacheCache;
6 use Friendica\Core\Config\Configuration;
9 * @requires extension memcache
12 class MemcacheCacheTest extends MemoryCacheTest
14 protected function getInstance()
16 $configMock = \Mockery::mock(Configuration::class);
18 $host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
21 ->shouldReceive('get')
22 ->with('system', 'memcache_host')
25 ->shouldReceive('get')
26 ->with('system', 'memcache_port')
30 $this->cache = new MemcacheCache($host, $configMock);
31 } catch (\Exception $e) {
32 $this->markTestSkipped('Memcache is not available');
37 public function tearDown()
39 $this->cache->clear(false);
46 * @dataProvider dataSimple
48 public function testGetAllKeys($value1, $value2, $value3)
50 $this->markTestIncomplete('Race condition because of too fast getAllKeys() which uses a workaround');