Padam87AttributeExtensionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtensions() 0 6 1
A testLoad() 0 15 1
1
<?php
2
namespace Padam87\AttributeBundle\Tests\DependencyInjection;
3
4
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
5
use Padam87\AttributeBundle\DependencyInjection\Padam87AttributeExtension;
6
7
class Padam87AttributeExtensionTest extends AbstractExtensionTestCase
8
{
9
    protected function getContainerExtensions()
10
    {
11
        return [
12
            new Padam87AttributeExtension(),
13
        ];
14
    }
15
16
    public function testLoad()
17
    {
18
        $this->load();
19
20
        $this->assertContainerBuilderHasServiceDefinitionWithTag(
21
            'attribute.attribute_creator',
22
            'doctrine.event_listener',
23
            ['event' => 'postLoad']
24
        );
25
        $this->assertContainerBuilderHasServiceDefinitionWithTag(
26
            'form.type.attributeCollection',
27
            'form.type',
28
            ['alias' => 'attributeCollection']
29
        );
30
    }
31
}
32