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