getContainerExtensions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace EmanueleMinotto\TwigInflectionBundle\Tests\DependencyInjection;
4
5
use EmanueleMinotto\TwigInflectionBundle\DependencyInjection\TwigInflectionExtension;
6
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
7
8
/**
9
 * @coversDefaultClass \EmanueleMinotto\TwigInflectionBundle\DependencyInjection\TwigInflectionExtension
10
 */
11
class TwigInflectionExtensionTest extends AbstractExtensionTestCase
12
{
13
    const SERVICE_ID = 'emanuele_minotto.twig.extension.inflection';
14
15
    /**
16
     * Return an array of container extensions you need to be registered for each test.
17
     *
18
     * @return ExtensionInterface[]
19
     */
20
    protected function getContainerExtensions()
21
    {
22
        return [
23
            new TwigInflectionExtension(),
24
        ];
25
    }
26
27
    /**
28
     * Test bundle core service.
29
     */
30
    public function testBundleService()
31
    {
32
        $this->load();
33
34
        $this->assertContainerBuilderHasService(
35
            self::SERVICE_ID,
36
            'DaveDevelopment\TwigInflection\Twig\Extension\Inflection'
37
        );
38
        $this->assertContainerBuilderHasServiceDefinitionWithTag(
39
            self::SERVICE_ID,
40
            'twig.extension'
41
        );
42
    }
43
}
44