BundleInitializationTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 20
ccs 11
cts 11
cp 1
rs 10
c 0
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\Flysystem\Tests\Functional;
13
14
use Nyholm\BundleTest\BaseBundleTestCase;
15
use Translation\PlatformAdapter\Flysystem\Bridge\Symfony\TranslationAdapterFlysystemBundle;
16
use Translation\SymfonyStorage\FileStorage;
17
18
class BundleInitializationTest extends BaseBundleTestCase
19
{
20 1
    protected function getBundleClass()
21
    {
22 1
        return TranslationAdapterFlysystemBundle::class;
23
    }
24
25 1
    public function testRegisterBundle()
26
    {
27 1
        $kernel = $this->createKernel();
28 1
        $kernel->addConfigFile(__DIR__.'/config.yml');
29
30 1
        $this->bootKernel();
31 1
        $container = $this->getContainer();
32
33 1
        $this->assertTrue($container->has('php_translation.adapter.flysystem.foo'));
34 1
        $service = $container->get('php_translation.adapter.flysystem.foo');
35 1
        $this->assertInstanceOf(FileStorage::class, $service);
36 1
    }
37
}
38