BundleInitializationTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
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\PlatformAdapter\Transifex\Tests\Functional;
13
14
use Nyholm\BundleTest\BaseBundleTestCase;
15
use Translation\PlatformAdapter\Transifex\Bridge\Symfony\TranslationAdapterTransifexBundle;
16
use Translation\PlatformAdapter\Transifex\Transifex;
17
18
class BundleInitializationTest extends BaseBundleTestCase
19
{
20
    protected function getBundleClass()
21
    {
22
        return TranslationAdapterTransifexBundle::class;
23
    }
24
25
    protected function setUp()
26
    {
27
        $kernel = $this->createKernel();
28
        $kernel->addConfigFile(__DIR__.'/../Resources/config.yml');
29
        parent::setUp();
30
    }
31
32
    public function testRegisterBundle()
33
    {
34
        $this->bootKernel();
35
        $container = $this->getContainer();
36
37
        $this->assertTrue($container->has('php_translation.adapter.transifex'));
38
        $service = $container->get('php_translation.adapter.transifex');
39
        $this->assertInstanceOf(Transifex::class, $service);
40
    }
41
}
42