|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* (c) Christian Gripp <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Core23\SitemapBundle\Tests\App; |
|
13
|
|
|
|
|
14
|
|
|
use Core23\SitemapBundle\Core23SitemapBundle; |
|
15
|
|
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; |
|
16
|
|
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
|
17
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
18
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
19
|
|
|
use Symfony\Component\HttpKernel\Kernel; |
|
20
|
|
|
use Symfony\Component\Routing\RouteCollectionBuilder; |
|
21
|
|
|
|
|
22
|
|
|
final class AppKernel extends Kernel |
|
23
|
|
|
{ |
|
24
|
|
|
use MicroKernelTrait; |
|
25
|
|
|
|
|
26
|
|
|
public function __construct() |
|
27
|
|
|
{ |
|
28
|
|
|
parent::__construct('test', false); |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
public function registerBundles() |
|
32
|
|
|
{ |
|
33
|
|
|
return [ |
|
34
|
|
|
new FrameworkBundle(), |
|
35
|
|
|
new Core23SitemapBundle(), |
|
36
|
|
|
]; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function getCacheDir(): string |
|
40
|
|
|
{ |
|
41
|
|
|
return $this->getBaseDir().'cache'; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
public function getLogDir(): string |
|
45
|
|
|
{ |
|
46
|
|
|
return $this->getBaseDir().'log'; |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
public function getProjectDir(): string |
|
50
|
|
|
{ |
|
51
|
|
|
return __DIR__; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
protected function configureRoutes(RouteCollectionBuilder $routes) |
|
55
|
|
|
{ |
|
56
|
|
|
$routes->import(__DIR__.'/../../src/Resources/config/routing/sitemap.yml'); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
protected function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader) |
|
|
|
|
|
|
60
|
|
|
{ |
|
61
|
|
|
$loader->load(__DIR__.'/config/config.yaml'); |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
private function getBaseDir(): string |
|
65
|
|
|
{ |
|
66
|
|
|
return sys_get_temp_dir().'/app-bundle/var/'; |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.