Padam87AttributeExtensionTest::testLoad()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 15
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
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