| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function testVerifyCacheDriver() |
||
| 22 | { |
||
| 23 | /** @var \Stash\Pool $pool */ |
||
| 24 | $pool = $this->getSetupFactory()->getServiceContainer()->get('ezpublish.cache_pool'); |
||
| 25 | |||
| 26 | $this->assertInstanceOf('\Symfony\Component\Cache\Adapter\TagAwareAdapter', $pool); |
||
| 27 | |||
| 28 | $reflectionPool = new \ReflectionProperty ($pool, 'itemsAdapter'); |
||
| 29 | $reflectionPool->setAccessible(true); |
||
| 30 | $innerPool = $reflectionPool->getValue($pool); |
||
| 31 | |||
| 32 | if (getenv('CUSTOM_CACHE_POOL') === 'singleredis') { |
||
| 33 | $this->assertInstanceOf('\Symfony\Component\Cache\Adapter\RedisAdapter', $innerPool); |
||
| 34 | } else { |
||
| 35 | $this->assertInstanceOf('\Symfony\Component\Cache\Adapter\FilesystemAdapter', $innerPool); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 |