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

29 lines
545 B
PHP
Raw Normal View History

<?php
namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Cache\CacheDriverFactory;
use Friendica\Core\Lock\CacheLockDriver;
/**
* @requires extension redis
*/
class RedisCacheLockDriverTest extends LockTest
{
protected function getInstance()
{
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'redis_host')
->andReturn('localhost');
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'redis_port')
->andReturn(null);
return new CacheLockDriver(CacheDriverFactory::create('redis'));
}
}