Completed
Pull Request — master (#33)
by Kevin
09:56
created

TestKernel::getCacheDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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