testConstruction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Tests\GBProd\ElasticaSpecificationBundle;
4
5
use GBProd\ElasticaSpecificationBundle\DependencyInjection\Compiler\QueryFactoryPass;
6
use GBProd\ElasticaSpecificationBundle\ElasticaSpecificationBundle;
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
/**
12
 * Tests for ElasticaSpecificationBundle
13
 *
14
 * @author GBProd <[email protected]>
15
 */
16
class ElasticaSpecificationBundleTest extends TestCase
17
{
18
    public function testConstruction()
19
    {
20
        $bundle = new ElasticaSpecificationBundle();
21
22
        $this->assertInstanceOf(ElasticaSpecificationBundle::class, $bundle);
23
        $this->assertInstanceOf(Bundle::class, $bundle);
24
    }
25
26
    public function testBuildAddCompilerPass()
27
    {
28
        $container = $this->prophesize(ContainerBuilder::class);
29
        $container
30
            ->addCompilerPass(new QueryFactoryPass())
31
            ->shouldBeCalled()
32
        ;
33
34
        $bundle = new ElasticaSpecificationBundle();
35
        $bundle->build($container->reveal());
36
    }
37
}
38