Completed
Push — master ( c7a350...473c45 )
by Sergei
38:34
created

ModeraBackendSecurityBundleTest::testBuild()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 9.4286
cc 3
eloc 11
nc 3
nop 0
1
<?php
2
3
namespace Modera\BackendSecurityBundle\Tests\Unit;
4
5
use Modera\BackendSecurityBundle\DependencyInjection\ServiceAliasCompilerPass;
6
use Modera\BackendSecurityBundle\ModeraBackendSecurityBundle;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * @author    Stas Chychkan <[email protected]>
11
 * @copyright 2015 Modera Foundation
12
 */
13
class ModeraBackendSecurityBundleTest extends \PHPUnit_Framework_TestCase
14
{
15
    public function testBuild()
16
    {
17
        $bundle = new ModeraBackendSecurityBundle();
18
19
        $builder = new ContainerBuilder();
20
        $bundle->build($builder);
21
22
        $passes = $builder->getCompiler()->getPassConfig()->getPasses();
23
24
        $hasPass = false;
25
        foreach ($passes as $pass) {
26
            if ($pass instanceof ServiceAliasCompilerPass) {
27
                $hasPass = true;
28
                break;
29
            }
30
        }
31
32
        $this->assertTrue($hasPass);
33
    }
34
}
35