TwigInflectionExtensionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtensions() 0 6 1
A testBundleService() 0 13 1
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