TestKernel::getLogDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Karser\Recaptcha3Bundle\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 \Symfony\Bundle\TwigBundle\TwigBundle(),
30
            new \Karser\Recaptcha3Bundle\KarserRecaptcha3Bundle(),
31
        ];
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function registerContainerConfiguration(LoaderInterface $loader)
38
    {
39
        $loader->load($this->configurationFilename);
40
    }
41
42
    public function getLogDir()
43
    {
44
        return sys_get_temp_dir().'/KarserRecaptcha3Bundle/log';
45
    }
46
47
    public function getCacheDir()
48
    {
49
        return sys_get_temp_dir().'/KarserRecaptcha3Bundle/cache/'.$this->environment;
50
    }
51
}
52