TestKernel::registerBundles()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 10
c 2
b 0
f 0
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