AlgoliaSpecificationBundleTest::testConstruction()   A
last analyzed

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\AlgoliaSpecificationBundle;
6
use GBProd\AlgoliaSpecificationBundle\DependencyInjection\Compiler\QueryFactoryPass;
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
/**
12
 * Tests for AlgoliaSpecificationBundle
13
 *
14
 * @author GBProd <[email protected]>
15
 */
16
class AlgoliaSpecificationBundleTest extends TestCase
17
{
18
    public function testConstruction()
19
    {
20
        $bundle = new AlgoliaSpecificationBundle();
21
22
        $this->assertInstanceOf(AlgoliaSpecificationBundle::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 AlgoliaSpecificationBundle();
35
        $bundle->build($container->reveal());
36
    }
37
}
38