BaseTestCase::getContainer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace ApiBundle\Tests;
4
5
use Symfony\Component\DependencyInjection\Container;
6
7
class BaseTestCase extends \PHPUnit_Framework_TestCase
8
{
9
    private $container;
10
11
    protected function setUp()
12
    {
13
        $kernel = new \AppKernel('test', true);
14
        $kernel->boot();
15
16
        $this->container = $kernel->getContainer();
17
    }
18
19
    /**
20
     * @return Container
21
     */
22
    protected function getContainer()
23
    {
24
        return $this->container;
25
    }
26
}