mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
38 lines
747 B
PHP
38 lines
747 B
PHP
<?php
|
|
|
|
|
|
namespace Friendica\Test\src\Core\Lock;
|
|
|
|
use Friendica\Core\Lock\CacheLockDriver;
|
|
use Friendica\Factory\CacheDriverFactory;
|
|
|
|
/**
|
|
* @requires extension redis
|
|
*/
|
|
class RedisCacheLockDriverTest extends LockTest
|
|
{
|
|
protected function getInstance()
|
|
{
|
|
$this->configMock
|
|
->shouldReceive('get')
|
|
->with('system', 'redis_host')
|
|
->andReturn('localhost');
|
|
|
|
$this->configMock
|
|
->shouldReceive('get')
|
|
->with('system', 'redis_port')
|
|
->andReturn(null);
|
|
|
|
$this->configMock
|
|
->shouldReceive('get')
|
|
->with('system', 'redis_db')
|
|
->andReturn(3);
|
|
|
|
$this->configMock
|
|
->shouldReceive('get')
|
|
->with('system', 'redis_password')
|
|
->andReturn(null);
|
|
|
|
return new CacheLockDriver(CacheDriverFactory::create('redis'));
|
|
}
|
|
}
|