Completed
Pull Request — master (#1)
by GBProd
04:41 queued 34s
created

AlgoliaSpecificationBundleTest::testConstruction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Tests\GBProd\AlgoliaSpecificationBundle;
4
5
use GBProd\AlgoliaSpecificationBundle\DependencyInjection\Compiler\QueryFactoryPass;
6
use GBProd\AlgoliaSpecificationBundle\AlgoliaSpecificationBundle;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
/**
11
 * Tests for AlgoliaSpecificationBundle
12
 *
13
 * @author GBProd <[email protected]>
14
 */
15
class AlgoliaSpecificationBundleTest extends \PHPUnit_Framework_TestCase
16
{
17
    public function testConstruction()
18
    {
19
        $bundle = new AlgoliaSpecificationBundle();
20
21
        $this->assertInstanceOf(AlgoliaSpecificationBundle::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 QueryFactoryPass())
30
            ->shouldBeCalled()
31
        ;
32
33
        $bundle = new AlgoliaSpecificationBundle();
34
        $bundle->build($container->reveal());
35
    }
36
}
37