HeltheTurbolinksExtensionTest::testLoadDefault()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
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