Completed
Push — master ( a1e10e...a443c1 )
by Tobias
07:25
created

BundleInitializationTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 20
ccs 11
cts 11
cp 1
rs 10
c 2
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBundleClass() 0 4 1
A testRegisterBundle() 0 12 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\Loco\Tests\Functional;
13
14
use Http\HttplugBundle\HttplugBundle;
15
use Nyholm\BundleTest\BaseBundleTestCase;
16
use Translation\PlatformAdapter\Loco\Bridge\Symfony\TranslationAdapterLocoBundle;
17
use Translation\PlatformAdapter\Loco\Loco;
18
19
class BundleInitializationTest extends BaseBundleTestCase
20
{
21 1
    protected function getBundleClass()
22
    {
23 1
        return TranslationAdapterLocoBundle::class;
24
    }
25
26 1
    public function testRegisterBundle()
27
    {
28 1
        $kernel = $this->createKernel();
29 1
        $kernel->addBundle(HttplugBundle::class);
30
31 1
        $this->bootKernel();
32 1
        $container = $this->getContainer();
33
34 1
        $this->assertTrue($container->has('php_translation.adapter.loco'));
35 1
        $service = $container->get('php_translation.adapter.loco');
36 1
        $this->assertInstanceOf(Loco::class, $service);
37 1
    }
38
}
39