Completed
Pull Request — master (#10)
by Tobias
07:39
created

BundleInitializationTest::getBundleClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
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\PhraseApp\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
use Translation\PlatformAdapter\PhraseApp\Bridge\Symfony\TranslationAdapterPhraseAppBundle;
19
20
class BundleInitializationTest extends BaseBundleTestCase
21
{
22
    protected function getBundleClass()
23
    {
24
        return TranslationAdapterPhraseAppBundle::class;
25
    }
26
27
    public function testRegisterBundle()
28
    {
29
        $kernel = $this->createKernel();
30
        $kernel->addBundle(HttplugBundle::class);
31
32
        $this->bootKernel();
33
        $container = $this->getContainer();
34
35
        $this->assertTrue($container->has('php_translation.adapter.phrase_app'));
36
        $service = $container->get('php_translation.adapter.phrase_app');
37
        $this->assertInstanceOf(Loco::class, $service);
38
    }
39
}
40