BaseTestCase::createKernel()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Happyr\AutoFallbackTranslationBundle\Tests\Functional;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
class BaseTestCase extends WebTestCase
8
{
9
    protected static function getKernelClass()
10
    {
11
        require_once __DIR__.'/app/AppKernel.php';
12
13
        return 'Happyr\AutoFallbackTranslationBundle\Tests\Functional\app\AppKernel';
14
    }
15
16
    protected static function createKernel(array $options = [])
17
    {
18
        $class = self::getKernelClass();
19
20
        return new $class(
21
            isset($options['config']) ? $options['config'] : 'default.yml'
22
        );
23
    }
24
}
25