friendica/tests/src/Core/Lock/MemcacheCacheLockTest.php
Philipp Holzer 34e4968c06
Adding possibility to use a different cache-backend for locking and caching
- Renaming *LockDriver to *Lock since it isn't a "driver" anymore
2019-08-04 15:42:39 +02:00

31 lines
626 B
PHP

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