TestKernel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 7 1
A registerContainerConfiguration() 0 9 2
1
<?php
2
3
/*
4
 * This file is part of the smsmode-bundle package.
5
 *
6
 * (c) 2019 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
 */
21
class TestKernel extends AbstractKernel {
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function registerBundles(): array {
27
28
        return [
29
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
30
            new Symfony\Bundle\MonologBundle\MonologBundle(),
31
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
32
            new WBW\Bundle\SmsModeBundle\WBWSmsModeBundle(),
33
        ];
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function registerContainerConfiguration(LoaderInterface $loader): void {
40
41
        // TODO: Remove when dropping support for Symfony 5
42
        if (6 <= Kernel::MAJOR_VERSION) {
43
            parent::registerContainerConfiguration($loader);
44
            return;
45
        }
46
47
        $loader->load(getcwd() . "/Tests/Fixtures/app/config/config_test.old.yml");
48
    }
49
}
50