TestKernel::registerBundles()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Knp\Bundle\SnappyBundle\Tests;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class TestKernel extends Kernel
9
{
10
    private $configurationFilename;
11
12
    /**
13
     * Defines the configuration filename.
14
     *
15
     * @param string $filename
16
     */
17
    public function setConfigurationFilename($filename)
18
    {
19
        $this->configurationFilename = $filename;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function registerBundles()
26
    {
27
        return [
28
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
29
            new \Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
30
        ];
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function registerContainerConfiguration(LoaderInterface $loader)
37
    {
38
        $loader->load($this->configurationFilename);
39
    }
40
}
41