BdfSerializerBundleTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 18
rs 10
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDefaultConfig() 0 16 4
1
<?php
2
3
namespace Bdf\SerializerBundle\Tests;
4
5
use Bdf\SerializerBundle\BdfSerializerBundle;
6
use Bdf\SerializerBundle\DependencyInjection\Compiler\SerializerLoaderPass;
7
use Bdf\SerializerBundle\DependencyInjection\Compiler\SerializerNormalizerPass;
8
use PHPUnit\Framework\TestCase;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
11
/**
12
 * BdfSerializerBundleTest.
13
 */
14
class BdfSerializerBundleTest extends TestCase
15
{
16
    public function testDefaultConfig()
17
    {
18
        $builder = new ContainerBuilder();
19
        $bundle = new BdfSerializerBundle();
20
        $bundle->build($builder);
21
22
        $compilerPasses = $builder->getCompiler()->getPassConfig()->getPasses();
23
        $found = 0;
24
25
        foreach ($compilerPasses as $pass) {
26
            if ($pass instanceof SerializerLoaderPass || $pass instanceof SerializerNormalizerPass) {
27
                ++$found;
28
            }
29
        }
30
31
        $this->assertSame(2, $found);
32
    }
33
}
34