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

BundleInitializationTest::getBundleClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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