1 | <?php |
||
6 | class RedisCacheTest extends CacheTest{ |
||
7 | |||
8 | protected $port = 6379; |
||
9 | |||
10 | /** |
||
11 | * @covers \DBAL\Caching\RedisCache::__construct |
||
12 | * @covers \DBAL\Caching\RedisCache::connect |
||
13 | * @covers \DBAL\Caching\RedisCache::addServer |
||
14 | * @covers \DBAL\Caching\RedisCache::save |
||
15 | * @covers \DBAL\Caching\RedisCache::fetch |
||
16 | */ |
||
17 | public function setUp() { |
||
18 | $success = false; |
||
19 | $this->cache = new RedisCache(); |
||
20 | $this->cache->connect('127.0.0.1', $this->port); |
||
21 | if ($this->cache->save('test', 'Success')) { |
||
22 | if ($this->cache->fetch('test') == 'Success') { |
||
23 | $success = true; |
||
24 | parent::setUp(); |
||
25 | } |
||
26 | } |
||
27 | if($success !== true){ |
||
28 | $this->markTestSkipped('Redis extension may not be loaded'); |
||
29 | } |
||
30 | } |
||
31 | |||
32 | } |
||
33 |