friendica/tests/src/Core/Lock/MemcacheCacheLockTest.php

31 lines
626 B
PHP
Raw Normal View History

2018-07-07 20:07:07 +02:00
<?php
namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Cache\MemcacheCache;
use Friendica\Core\Config\Configuration;
use Friendica\Core\Lock\CacheLock;
2018-07-07 20:07:07 +02:00
/**
* @requires extension Memcache
*/
class MemcacheCacheLockTest extends LockTest
2018-07-07 20:07:07 +02:00
{
protected function getInstance()
{
$configMock = \Mockery::mock(Configuration::class);
$configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_host')
->andReturn('localhost');
$configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_port')
->andReturn(11211);
return new CacheLock(new MemcacheCache('localhost', $configMock));
2018-07-07 20:07:07 +02:00
}
}