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

29 lines
542 B
PHP
Raw Normal View History

<?php
namespace Friendica\Test\src\Core\Lock;
2019-03-03 15:34:07 +01:00
use Friendica\Factory\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'));
}
}