Passed
Branch master (b46ccf)
by Juan
17:57 queued 08:11
created

AppTestKernel::configureContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 30
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 19
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 30
rs 9.6333
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
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires the property $instanceof which is not provided by Micayael\NativeQueryFrom...dle\Tests\AppTestKernel.
Loading history...
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