Completed
Push — master ( 344433...16bc3f )
by André
40:49 queued 19:02
created

EnvTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2
lcom 0
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A testVerifyStashDriver() 0 11 2
1
<?php
2
3
/**
4
 * File containing the EnvTest class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\API\Repository\Tests\Regression;
10
11
use eZ\Publish\API\Repository\Tests\BaseTest;
12
13
/**
14
 * Test case to verify Integration tests are setup with the right instances.
15
 */
16
class EnvTest extends BaseTest
17
{
18
    /**
19
     * Verify Redis is setup if asked for.
20
     */
21
    public function testVerifyStashDriver()
22
    {
23
        /** @var \Stash\Pool $pool */
24
        $pool = $this->getSetupFactory()->getServiceContainer()->get('ezpublish.cache_pool');
25
26
        if (getenv('CUSTOM_CACHE_POOL') === 'singleredis') {
27
            $this->assertInstanceOf('\Stash\Driver\Redis', $pool->getDriver());
28
        } else {
29
            $this->assertInstanceOf('\Stash\Driver\Ephemeral', $pool->getDriver());
30
        }
31
    }
32
}
33