Completed
Push — master ( fe4f4a...688ead )
by GBProd
05:51
created

testBuildAddCompilerPass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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