Completed
Pull Request — master (#33)
by Kevin
01:13
created

TestKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 6
dl 0
loc 27
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A registerContainerConfiguration() 0 4 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
1
<?php
2
3
namespace Zenstruck\RedirectBundle\Tests\Fixture;
4
5
use Symfony\Component\Config\Loader\LoaderInterface;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
class TestKernel extends Kernel
12
{
13
    public function registerBundles()
14
    {
15
        return [
16
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
17
            new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
18
            new \Zenstruck\RedirectBundle\ZenstruckRedirectBundle(),
19
            new \Zenstruck\RedirectBundle\Tests\Fixture\Bundle\TestBundle(),
20
        ];
21
    }
22
23
    public function registerContainerConfiguration(LoaderInterface $loader)
24
    {
25
        $loader->load(\sprintf('%s/config.yml', __DIR__));
26
    }
27
28
    public function getCacheDir()
29
    {
30
        return \sys_get_temp_dir().'/ZenstruckRedirectBundle/'.Kernel::VERSION.'/cache/'.$this->environment;
31
    }
32
33
    public function getLogDir()
34
    {
35
        return \sys_get_temp_dir().'/ZenstruckRedirectBundle/'.Kernel::VERSION.'/logs';
36
    }
37
}
38