BundleInitializationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBundleClass() 0 4 1
A setUp() 0 6 1
A testRegisterBundle() 0 9 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\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