Completed
Push — master ( 169c90...170db4 )
by Christophe
13s
created

TestKernel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 0
cbo 5
dl 0
loc 30
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 7 1
A registerContainerConfiguration() 0 9 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
1
<?php
2
3
namespace Incenteev\TranslationCheckerBundle\Tests\FixtureApp;
4
5
use Incenteev\TranslationCheckerBundle\IncenteevTranslationCheckerBundle;
6
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
7
use Symfony\Component\Config\Loader\LoaderInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Kernel;
10
11
class TestKernel extends Kernel
12
{
13
    public function registerBundles()
14
    {
15
        return array(
16
            new FrameworkBundle(),
17
            new IncenteevTranslationCheckerBundle(),
18
        );
19
    }
20
21
    public function registerContainerConfiguration(LoaderInterface $loader)
22
    {
23
        $loader->load(function (ContainerBuilder $container) {
24
            $container->loadFromExtension('framework', array(
25
                'translator' => array('fallback' => 'en'),
26
                'secret' => 'test',
27
            ));
28
        });
29
    }
30
31
    public function getCacheDir()
32
    {
33
        return sys_get_temp_dir().'/incenteev_translation_checker';
34
    }
35
36
    public function getLogDir()
37
    {
38
        return $this->getCacheDir();
39
    }
40
}
41