Completed
Push — master ( 850aa2...1b9320 )
by Tobias
01:49
created

BundleInitializationTest::getBundleClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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