Completed
Push — master ( fb244a...6e9b12 )
by John
05:17
created

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