|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace AtlassianConnectBundle\Tests\Functional\App; |
|
6
|
|
|
|
|
7
|
|
|
use AtlassianConnectBundle\AtlassianConnectBundle; |
|
8
|
|
|
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; |
|
9
|
|
|
use Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle; |
|
10
|
|
|
use Psr\Log\NullLogger; |
|
11
|
|
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; |
|
12
|
|
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
|
13
|
|
|
use Symfony\Bundle\SecurityBundle\SecurityBundle; |
|
14
|
|
|
use Symfony\Bundle\TwigBundle\TwigBundle; |
|
15
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
16
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
17
|
|
|
use Symfony\Component\HttpKernel\Bundle\BundleInterface; |
|
18
|
|
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel; |
|
19
|
|
|
|
|
20
|
|
|
final class Kernel extends BaseKernel |
|
21
|
|
|
{ |
|
22
|
|
|
use MicroKernelTrait; |
|
|
|
|
|
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @return array<BundleInterface> |
|
26
|
|
|
*/ |
|
27
|
|
|
public function registerBundles(): array |
|
28
|
|
|
{ |
|
29
|
|
|
return [ |
|
30
|
|
|
new FrameworkBundle(), |
|
31
|
|
|
new TwigBundle(), |
|
32
|
|
|
new SecurityBundle(), |
|
33
|
|
|
new DoctrineBundle(), |
|
34
|
|
|
new DoctrineFixturesBundle(), |
|
35
|
|
|
new AtlassianConnectBundle(), |
|
36
|
|
|
]; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function getProjectDir(): string |
|
40
|
|
|
{ |
|
41
|
|
|
return \dirname(__DIR__); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
public function getCacheDir(): string |
|
45
|
|
|
{ |
|
46
|
|
|
return sys_get_temp_dir().'/com.github.thecatontheflat.atlassian/tests/var/cache'; |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
public function getLogDir(): string |
|
50
|
|
|
{ |
|
51
|
|
|
return sys_get_temp_dir().'/com.github.thecatontheflat.atlassian/tests/var'.$this->environment.'/log'; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void |
|
|
|
|
|
|
55
|
|
|
{ |
|
56
|
|
|
$configDir = $this->getProjectDir().'/config'; |
|
57
|
|
|
|
|
58
|
|
|
$loader->load($configDir.'/{base}/*.yaml', 'glob'); |
|
59
|
|
|
|
|
60
|
|
|
$loader->load($configDir.'/{packages}/*.yaml', 'glob'); |
|
61
|
|
|
$loader->load($configDir.'/{services}.yaml', 'glob'); |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
protected function build(ContainerBuilder $container): void |
|
65
|
|
|
{ |
|
66
|
|
|
$container->register('logger', NullLogger::class); |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|