Completed
Push — master ( 0af75b...08e815 )
by GBProd
03:00
created

ElasticaSpecificationBundleTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstruction() 0 7 1
A testBuildAddCompilerPass() 0 11 1
1
<?php
2
3
namespace Tests\GBProd\ElasticaSpecificationBundle;
4
5
use GBProd\ElasticaSpecificationBundle\DependencyInjection\Compiler\ExpressionBuilderPass;
6
use GBProd\ElasticaSpecificationBundle\ElasticaSpecificationBundle;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
/**
11
 * Tests for ElasticaSpecificationBundle
12
 *
13
 * @author GBProd <[email protected]>
14
 */
15
class ElasticaSpecificationBundleTest extends \PHPUnit_Framework_TestCase
16
{
17
    public function testConstruction()
18
    {
19
        $bundle = new ElasticaSpecificationBundle();
20
21
        $this->assertInstanceOf(ElasticaSpecificationBundle::class, $bundle);
22
        $this->assertInstanceOf(Bundle::class, $bundle);
23
    }
24
25
    public function testBuildAddCompilerPass()
26
    {
27
        $container = $this->prophesize(ContainerBuilder::class);
28
        $container
29
            ->addCompilerPass(new ExpressionBuilderPass())
30
            ->shouldBeCalled()
31
        ;
32
33
        $bundle = new ElasticaSpecificationBundle();
34
        $bundle->build($container->reveal());
35
    }
36
}
37