Completed
Push — master ( f7b33a...213343 )
by Andy
03:36
created

PalmtreeCanonicalUrlExtensionTest::testGetAlias()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Palmtree\CanonicalUrlBundle\Tests\DependencyInjection;
4
5
use Palmtree\CanonicalUrlBundle\DependencyInjection\PalmtreeCanonicalUrlExtension;
6
use Palmtree\CanonicalUrlBundle\Tests\AbstractTest;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
class PalmtreeCanonicalUrlExtensionTest extends AbstractTest
10
{
11
    /**
12
     * @dataProvider configProvider
13
     */
14
    public function testSetConfigurationParameter(array $config)
15
    {
16
        $container = new ContainerBuilder();
17
        $container->setParameter('kernel.environment', 'test');
18
        $extension = new PalmtreeCanonicalUrlExtension();
19
20
        $extension->load(array($config), $container);
21
22
        $this->assertEquals($config, $container->getParameter('palmtree.canonical_url.config'));
23
    }
24
25
    public function testGetAlias()
26
    {
27
        $extension = new PalmtreeCanonicalUrlExtension();
28
29
        $this->assertEquals(
30
            'palmtree_canonical_url',
31
            $extension->getAlias(),
32
            'getAlias returns "palmtree_canonical_url"'
33
        );
34
    }
35
}
36