Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | protected function setUp(): void |
||
19 | { |
||
20 | putenv('CACHE_CLIENT=memcached'); |
||
21 | |||
22 | if (false === extension_loaded('memcached')) { |
||
23 | $this->markTestSkipped('Memcached extension is not loaded.'); |
||
24 | } |
||
25 | |||
26 | if (getenv('CI')) { |
||
27 | putenv('MEMCACHED_POOL=[["127.0.0.1", 11211]]'); |
||
28 | } else { |
||
29 | putenv('MEMCACHED_POOL=[["memcached", 11211]]'); |
||
30 | } |
||
31 | |||
32 | $this->cache = (new CacheClientFactory(new ConfigFactory))->new(); |
||
33 | $this->cache->clear(); |
||
34 | } |
||
35 | } |