Conditions | 3 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function setUp(): void |
||
36 | { |
||
37 | putenv('CACHE_CLIENT=redis'); |
||
38 | |||
39 | if (false === extension_loaded('redis')) { |
||
40 | $this->markTestSkipped('Redis extension is not loaded.'); |
||
41 | } |
||
42 | |||
43 | if (false === extension_loaded('igbinary')) { |
||
44 | $this->markTestSkipped('"igbinary" extension is not loaded.'); |
||
45 | } |
||
46 | |||
47 | $this->cache = (new CacheClientFactory(new ConfigFactory([ |
||
48 | 'host' => getenv('REDIS_SERVER_HOST'), |
||
49 | 'port' => getenv('REDIS_SERVER_PORT'), |
||
50 | |||
51 | 'serializer' => Serializer::PHP, |
||
52 | ])))->new(); |
||
53 | |||
54 | $this->cache->clear(); |
||
55 | } |
||
56 | } |