TestKernel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 12
c 2
b 0
f 0
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A registerContainerConfiguration() 0 9 2
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
use Symfony\Component\Config\Loader\LoaderInterface;
13
use Symfony\Component\HttpKernel\Kernel;
14
use WBW\Bundle\CoreBundle\Tests\AbstractKernel;
15
16
/**
17
 * Test kernel.
18
 *
19
 * @author webeweb <https://github.com/webeweb>
20
 * @package WBW\Bundle\CoreBundle\Tests\Fixtures
21
 */
22
class TestKernel extends AbstractKernel {
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function registerBundles(): array {
28
29
        return [
30
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
31
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
32
            new Symfony\Bundle\MonologBundle\MonologBundle(),
33
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
34
            new Symfony\Bundle\TwigBundle\TwigBundle(),
35
            new WBW\Bundle\CoreBundle\WBWCoreBundle(),
36
        ];
37
    }
38
39
    /**
40
     * {@inheritDoc}
41
     */
42
    public function registerContainerConfiguration(LoaderInterface $loader): void {
43
44
        // TODO: Remove when dropping support for Symfony 5
45
        if (Kernel::MAJOR_VERSION < 6) {
46
            $loader->load(getcwd() . "/Tests/Fixtures/app/config/config_test.old.yml");
47
            return;
48
        }
49
50
        parent::registerContainerConfiguration($loader);
51
    }
52
}
53