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

ModeraBackendSecurityBundleTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBuild() 0 19 3
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