Passed
Push — master ( 3690f8...664f7a )
by Albin
46s
created

TestKernel::process()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 3
eloc 5
nc 4
nop 1
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