ContainerTestCase::setUpBeforeClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Decline\TransformatBundle\Tests;
4
5
use Decline\TransformatBundle\Tests\App\AppKernel;
6
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
7
use Symfony\Component\DependencyInjection\ContainerInterface;
8
9
/**
10
 * Class ContainerTestCase
11
 * @package Decline\TransformatBundle\Tests
12
 */
13
abstract class ContainerTestCase extends KernelTestCase
14
{
15
16
    /**
17
     * The class of the Kernel to boot for this test
18
     * @var string
19
     */
20
    protected static $class = AppKernel::class;
21
22
    /**
23
     * The Container
24
     * @var ContainerInterface
25
     */
26
    protected static $container;
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public static function setUpBeforeClass()
32
    {
33
        self::bootKernel();
34
        self::$container = self::$kernel->getContainer();
35
    }
36
}