]> git.mxchange.org Git - friendica.git/blob - tests/src/Core/Cache/RedisCacheDriverTest.php
Merge pull request #6678 from rabuzarus/20190217_-_fix_magicLinks_mentions
[friendica.git] / tests / src / Core / Cache / RedisCacheDriverTest.php
1 <?php
2
3
4 namespace Friendica\Test\src\Core\Cache;
5
6 use Friendica\Core\Cache\CacheDriverFactory;
7
8 /**
9  * @requires extension redis
10  */
11 class RedisCacheDriverTest extends MemoryCacheTest
12 {
13         protected function getInstance()
14         {
15                 $this->configMock
16                         ->shouldReceive('get')
17                         ->with('system', 'redis_host')
18                         ->andReturn('localhost');
19
20                 $this->configMock
21                         ->shouldReceive('get')
22                         ->with('system', 'redis_port')
23                         ->andReturn(null);
24
25                 $this->cache = CacheDriverFactory::create('redis');
26                 return $this->cache;
27         }
28
29         public function tearDown()
30         {
31                 $this->cache->clear(false);
32                 parent::tearDown();
33         }
34 }