]> git.mxchange.org Git - friendica.git/blob - tests/src/Core/Lock/RedisCacheLockDriverTest.php
0c9deea16e3ba9124d43e526f4fa0d7f8e53a3fd
[friendica.git] / tests / src / Core / Lock / RedisCacheLockDriverTest.php
1 <?php
2
3
4 namespace Friendica\Test\src\Core\Lock;
5
6 use Friendica\Core\Cache\CacheDriverFactory;
7 use Friendica\Core\Lock\CacheLockDriver;
8
9 /**
10  * @requires extension redis
11  */
12 class RedisCacheLockDriverTest extends LockTest
13 {
14         protected function getInstance()
15         {
16                 $this->configCache
17                         ->shouldReceive('get')
18                         ->with('system', 'redis_host', NULL)
19                         ->andReturn('localhost');
20
21                 $this->configCache
22                         ->shouldReceive('get')
23                         ->with('system', 'redis_port', NULL)
24                         ->andReturn(null);
25
26                 return new CacheLockDriver(CacheDriverFactory::create('redis'));
27         }
28 }