2018-07-07 18:07:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Lock;
|
|
|
|
|
|
|
|
use Friendica\Core\Cache\CacheDriverFactory;
|
|
|
|
use Friendica\Core\Lock\CacheLockDriver;
|
|
|
|
|
2018-07-18 19:04:18 +00:00
|
|
|
/**
|
|
|
|
* @requires extension Memcache
|
|
|
|
*/
|
2018-07-07 18:07:07 +00:00
|
|
|
class MemcacheCacheLockDriverTest extends LockTest
|
|
|
|
{
|
|
|
|
protected function getInstance()
|
|
|
|
{
|
2019-02-07 19:44:03 +00:00
|
|
|
$this->configCache
|
|
|
|
->shouldReceive('get')
|
|
|
|
->with('system', 'memcache_host', NULL)
|
|
|
|
->andReturn('localhost');
|
|
|
|
|
|
|
|
$this->configCache
|
|
|
|
->shouldReceive('get')
|
|
|
|
->with('system', 'memcache_port', NULL)
|
|
|
|
->andReturn(11211);
|
2019-01-30 19:26:17 +00:00
|
|
|
|
2018-09-05 20:16:23 +00:00
|
|
|
return new CacheLockDriver(CacheDriverFactory::create('memcache'));
|
2018-07-07 18:07:07 +00:00
|
|
|
}
|
|
|
|
}
|