Passed
Push — master ( d2e487...b38026 )
by Tobias
05:31
created

BaseTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBundleClass() 0 3 1
A setUp() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Bundle\Tests\Functional;
13
14
use Nyholm\BundleTest\AppKernel;
15
use Nyholm\BundleTest\BaseBundleTestCase;
16
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
17
use Symfony\Bundle\TwigBundle\TwigBundle;
18
use Translation\Bundle\TranslationBundle;
19
20
/**
21
 * @author Tobias Nyholm <[email protected]>
22
 */
23
abstract class BaseTestCase extends BaseBundleTestCase
24
{
25
    /**
26
     * @var AppKernel
27
     */
28
    protected $kernel;
29
30
    protected function getBundleClass(): string
31
    {
32
        return FrameworkBundle::class;
33
    }
34
35
    protected function setUp(): void
36
    {
37
        $kernel = $this->createKernel();
38
        $kernel->addConfigFile(__DIR__.'/app/config/default.yaml');
39
40
        $kernel->addBundle(TwigBundle::class);
41
        $kernel->addBundle(TranslationBundle::class);
42
43
        $this->kernel = $kernel;
44
45
        parent::setUp();
46
    }
47
}
48