Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | protected function setUp(): void |
||
20 | { |
||
21 | putenv('CACHE_CLIENT=redis'); |
||
22 | |||
23 | if (false === extension_loaded('redis')) { |
||
24 | $this->markTestSkipped('Redis extension is not loaded.'); |
||
25 | } |
||
26 | |||
27 | $this->cache = (new CacheClientFactory(new ConfigFactory([ |
||
28 | 'host' => getenv('REDIS_SERVER_HOST'), |
||
29 | 'port' => getenv('REDIS_SERVER_PORT'), |
||
30 | 'serializer' => Serializer::JSON, |
||
31 | |||
32 | 'options' => [ |
||
33 | 'prefix' => 'test:' |
||
34 | ], |
||
35 | |||
36 | ])))->new(); |
||
37 | |||
38 | $this->cache->clear(); |
||
39 | } |
||
40 | } |