1
|
|
|
<?php
|
2
|
|
|
declare(strict_types=1);
|
3
|
|
|
|
4
|
|
|
namespace Sil\RouteSecurityBundle\Tests\Fixtures;
|
5
|
|
|
|
6
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
7
|
|
|
use Symfony\Component\HttpKernel\Kernel;
|
8
|
|
|
|
9
|
|
|
/**
|
10
|
|
|
* App Test Kernel for functional tests.
|
11
|
|
|
*/
|
12
|
|
|
class AppKernel extends Kernel
|
13
|
|
|
{
|
14
|
|
|
public function __construct($environment, $debug)
|
15
|
|
|
{
|
16
|
|
|
parent::__construct($environment, $debug);
|
17
|
|
|
}
|
18
|
|
|
|
19
|
|
|
public function registerBundles()
|
20
|
|
|
{
|
21
|
|
|
return array(
|
22
|
|
|
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
23
|
|
|
new \Symfony\Bundle\TwigBundle\TwigBundle(),
|
24
|
|
|
new \Sil\RouteSecurityBundle\SilRouteSecurityBundle(),
|
25
|
|
|
new \Symfony\Bundle\SecurityBundle\SecurityBundle()
|
26
|
|
|
);
|
27
|
|
|
}
|
28
|
|
|
|
29
|
|
|
public function getRootDir()
|
30
|
|
|
{
|
31
|
|
|
return __DIR__;
|
32
|
|
|
}
|
33
|
|
|
|
34
|
|
|
public function getProjectDir()
|
35
|
|
|
{
|
36
|
|
|
return __DIR__.'/../';
|
37
|
|
|
}
|
38
|
|
|
|
39
|
|
|
public function getCacheDir()
|
40
|
|
|
{
|
41
|
|
|
return sys_get_temp_dir().'/'.Kernel::VERSION.'/sil-route-security/cache/'.$this->environment;
|
42
|
|
|
}
|
43
|
|
|
|
44
|
|
|
public function getLogDir()
|
45
|
|
|
{
|
46
|
|
|
return sys_get_temp_dir().'/'.Kernel::VERSION.'/sil-route-security/logs';
|
47
|
|
|
}
|
48
|
|
|
|
49
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
50
|
|
|
{
|
51
|
|
|
$loader->load(__DIR__.'/config/base_config.yaml');
|
52
|
|
|
}
|
53
|
|
|
|
54
|
|
|
public function serialize()
|
55
|
|
|
{
|
56
|
|
|
return serialize(array($this->getEnvironment(), $this->isDebug()));
|
57
|
|
|
}
|
58
|
|
|
|
59
|
|
|
public function unserialize($str)
|
60
|
|
|
{
|
61
|
|
|
call_user_func_array(array($this, '__construct'), unserialize($str));
|
62
|
|
|
}
|
63
|
|
|
}
|
64
|
|
|
|