ContextManagerClassTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testDifferentEnv() 0 9 1
A provideClassAndOptions() 0 6 1
1
<?php
2
3
namespace OpenOrchestra\FunctionalTests\BackofficeBundle\DependencyInjection;
4
5
use OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractKernelTestCase;
6
7
/**
8
 * Class ContextManagerClassTest
9
 *
10
 * @group integrationTest
11
 */
12
class ContextManagerClassTest extends AbstractKernelTestCase
13
{
14
    /**
15
     * @param string $classExpected
16
     * @param string $env
17
     * @param bool   $debug
18
     *
19
     * @dataProvider provideClassAndOptions
20
     */
21
    public function testDifferentEnv($classExpected, $env, $debug)
22
    {
23
        $kernel = static::createKernel(array('environment' => $env ,'debug' => $debug));
24
        $kernel->boot();
25
        $this->assertInstanceOf(
26
            $classExpected,
27
            $kernel->getContainer()->get('open_orchestra_backoffice.context_backoffice_manager')
28
        );
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function provideClassAndOptions()
35
    {
36
        return array(
37
            array('OpenOrchestra\Backoffice\Context\TestContextManager', 'test', true),
38
        );
39
    }
40
}
41