Completed
Branch custom_translations (7e9ce6)
by Antonio
08:29
created

TestKernel::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Flagbit\Bundle\TableAttributeBundle\Test\Kernel;
4
5
require_once __DIR__.'/../../vendor/akeneo/pim-community-dev/app/AppKernel.php';
6
7
use Flagbit\Bundle\TableAttributeBundle\FlagbitTableAttributeBundle;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
10
class TestKernel extends \AppKernel
11
{
12
    /**
13
     * Registers your custom bundles
14
     *
15
     * @return array
16
     */
17
    protected function registerProjectBundles()
18
    {
19
        return [
20
            new FlagbitTableAttributeBundle(),
21
        ];
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function getRootDir(): string
28
    {
29
        return __DIR__;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getCacheDir(): string
36
    {
37
        return __DIR__
38
            . DIRECTORY_SEPARATOR
39
            . 'var'
40
            . DIRECTORY_SEPARATOR
41
            . 'cache'
42
            . DIRECTORY_SEPARATOR
43
            . $this->getEnvironment();
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getLogDir(): string
50
    {
51
        return __DIR__ . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'logs';
52
    }
53
54
    protected function build(ContainerBuilder $container)
55
    {
56
        $serviceIds = ['pim_catalog.validator.constraint_guesser.chained_attribute', 'flagbit_catalog_table.factory.value.table', 'form.extension'];
57
        $container->addCompilerPass(new PublicServiceCompilerPass($serviceIds));
58
    }
59
60
}
61