BundleInitializationTest::getBundleClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace tests\Happyr\BlazeBundle\Functional;
4
5
use Happyr\BlazeBundle\HappyrBlazeBundle;
6
use Happyr\BlazeBundle\Service\BlazeManagerInterface;
7
use Nyholm\BundleTest\BaseBundleTestCase;
8
9
class BundleInitializationTest extends BaseBundleTestCase
10
{
11
    protected function getBundleClass()
12
    {
13
        return HappyrBlazeBundle::class;
14
    }
15
16
    public function testInitBundle()
17
    {
18
        // Create a new Kernel
19
        $kernel = $this->createKernel();
20
21
        // Add some configuration
22
        $kernel->addConfigFile(__DIR__.'/Resources/services.yml');
23
24
        // Boot the kernel.
25
        $this->bootKernel();
26
27
        // Get the containter
28
        $container = $this->getContainer();
29
30
        // Test if you services exists
31
        $this->assertTrue($container->has('test.happyr.blaze'));
32
        $service = $container->get('test.happyr.blaze');
33
        $this->assertInstanceOf(BlazeManagerInterface::class, $service);
34
    }
35
}
36