1 | <?php |
||
2 | |||
3 | namespace Micayael\NativeQueryFromFileBuilderBundle\Tests; |
||
4 | |||
5 | use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; |
||
6 | use Micayael\NativeQueryFromFileBuilderBundle\NativeQueryFromFileBuilderBundle; |
||
7 | use Symfony\Bundle\FrameworkBundle\FrameworkBundle; |
||
8 | use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
||
9 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
||
10 | use Symfony\Component\HttpKernel\Kernel as BaseKernel; |
||
11 | |||
12 | class AppTestKernel extends BaseKernel |
||
13 | { |
||
14 | use MicroKernelTrait; |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
15 | |||
16 | public function registerBundles(): iterable |
||
17 | { |
||
18 | return [ |
||
19 | new NativeQueryFromFileBuilderBundle(), |
||
20 | new FrameworkBundle(), |
||
21 | new DoctrineBundle(), |
||
22 | ]; |
||
23 | } |
||
24 | |||
25 | protected function configureContainer(ContainerConfigurator $c): void |
||
26 | { |
||
27 | $c->extension('framework', [ |
||
28 | 'secret' => 'devsecret', |
||
29 | 'router' => [ |
||
30 | 'utf8' => true, |
||
31 | ], |
||
32 | ]); |
||
33 | |||
34 | $c->extension('doctrine', [ |
||
35 | 'dbal' => [ |
||
36 | 'default_connection' => 'default', |
||
37 | 'connections' => [ |
||
38 | 'default' => [ |
||
39 | 'dbname' => null, |
||
40 | 'host' => 'localhost', |
||
41 | 'port' => null, |
||
42 | 'user' => 'root', |
||
43 | 'password' => null, |
||
44 | ], |
||
45 | ], |
||
46 | ], |
||
47 | 'orm' => [ |
||
48 | 'default_entity_manager' => null, |
||
49 | ], |
||
50 | ]); |
||
51 | |||
52 | $c->extension('native_query_from_file_builder', [ |
||
53 | 'sql_queries_dir' => 'config/queries', |
||
54 | 'cache_sql' => false, |
||
55 | ]); |
||
56 | } |
||
57 | } |
||
58 |