HeltheTurbolinksExtensionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testLoadDefault() 0 15 1
1
<?php
2
3
/*
4
 * This file is part of the HeltheTurbolinksBundle package.
5
 *
6
 * (c) Carl Alexander <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Helthe\Bundle\TurbolinksBundle\Tests\DependencyInjection;
13
14
use Helthe\Bundle\TurbolinksBundle\DependencyInjection\HeltheTurbolinksExtension;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
17
class HeltheTurbolinksExtensionTest extends \PHPUnit_Framework_TestCase
18
{
19
    public function testLoadDefault()
20
    {
21
        $container = new ContainerBuilder();
22
        $loader = new HeltheTurbolinksExtension();
23
        $loader->load(array(array()), $container);
24
25
        // Turbolinks Service
26
        $this->assertTrue($container->hasParameter('helthe_turbolinks.turbolinks.class'));
27
        $this->assertTrue($container->hasDefinition('helthe_turbolinks.turbolinks'));
28
29
        // Turbolinks Listener Service
30
        $this->assertTrue($container->hasParameter('helthe_turbolinks.listener.turbolinks.class'));
31
        $this->assertTrue($container->hasDefinition('helthe_turbolinks.listener.turbolinks'));
32
        $this->assertTrue($container->getDefinition('helthe_turbolinks.listener.turbolinks')->hasTag('kernel.event_subscriber'));
33
    }
34
}
35