4 namespace Friendica\Test\src\Core\Lock;
6 use Friendica\Core\Cache\MemcacheCache;
7 use Friendica\Core\Config\Configuration;
8 use Friendica\Core\Lock\CacheLock;
11 * @requires extension Memcache
13 class MemcacheCacheLockTest extends LockTest
15 protected function getInstance()
17 $configMock = \Mockery::mock(Configuration::class);
19 $host = $_SERVER['MEMCACHE_HOST'] ?? 'localhost';
22 ->shouldReceive('get')
23 ->with('system', 'memcache_host')
26 ->shouldReceive('get')
27 ->with('system', 'memcache_port')
33 $cache = new MemcacheCache($host, $configMock);
34 $lock = new CacheLock($cache);
35 } catch (\Exception $e) {
36 $this->markTestSkipped('Memcache is not available');