Completed
Pull Request — master (#114)
by Harrison
07:56
created

TestKernel::registerContainerConfiguration()   A

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 1
1
<?php declare(strict_types=1);
2
3
namespace KleijnWeb\SwaggerBundle\Tests\Functional\PetStore\app;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class TestKernel extends Kernel
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function registerBundles()
14
    {
15
        $bundles = [
16
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
17
            new \Symfony\Bundle\MonologBundle\MonologBundle(),
18
            new \KleijnWeb\SwaggerBundle\KleijnWebSwaggerBundle(),
19
            new \KleijnWeb\SwaggerBundle\Tests\Functional\PetStore\PetStoreBundle(),
20
        ];
21
22
        if (0 === strpos($this->getEnvironment(), 'secure')) {
23
            $bundles[] = new \Symfony\Bundle\SecurityBundle\SecurityBundle();
24
        }
25
26
        return $bundles;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function registerContainerConfiguration(LoaderInterface $loader)
33
    {
34
        $loader->load(__DIR__ . '/config_' . $this->getEnvironment() . '.yml');
35
    }
36
}
37