Core23PiwikExtensionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testLoadDefault() 0 8 1
A getContainerExtensions() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[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 Core23\PiwikBundle\Tests\DependencyInjection;
13
14
use Core23\PiwikBundle\DependencyInjection\Core23PiwikExtension;
15
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
16
17
final class Core23PiwikExtensionTest extends AbstractExtensionTestCase
18
{
19
    public function testLoadDefault(): void
20
    {
21
        $this->setParameter('kernel.bundles', []);
22
        $this->load();
23
24
        $this->assertContainerBuilderHasAlias('core23_piwik.http.client', 'httplug.client.default');
25
        $this->assertContainerBuilderHasAlias('core23_piwik.http.message_factory', 'httplug.message_factory.default');
26
    }
27
28
    protected function getContainerExtensions(): array
29
    {
30
        return [
31
            new Core23PiwikExtension(),
32
        ];
33
    }
34
}
35