]> git.mxchange.org Git - friendica.git/blob - tests/src/Core/Lock/RedisCacheLockDriverTest.php
Merge pull request #7000 from MrPetovan/task/6999-no-probe-magic-link
[friendica.git] / tests / src / Core / Lock / RedisCacheLockDriverTest.php
1 <?php
2
3
4 namespace Friendica\Test\src\Core\Lock;
5
6 use Friendica\Core\Lock\CacheLockDriver;
7 use Friendica\Factory\CacheDriverFactory;
8
9 /**
10  * @requires extension redis
11  */
12 class RedisCacheLockDriverTest extends LockTest
13 {
14         protected function getInstance()
15         {
16                 $this->configMock
17                         ->shouldReceive('get')
18                         ->with('system', 'redis_host')
19                         ->andReturn('localhost');
20
21                 $this->configMock
22                         ->shouldReceive('get')
23                         ->with('system', 'redis_port')
24                         ->andReturn(null);
25
26                 $this->configMock
27                         ->shouldReceive('get')
28                         ->with('system', 'redis_db')
29                         ->andReturn(3);
30
31                 $this->configMock
32                         ->shouldReceive('get')
33                         ->with('system', 'redis_password')
34                         ->andReturn(null);
35
36                 return new CacheLockDriver(CacheDriverFactory::create('redis'));
37         }
38 }