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

ElasticsearchDataProviderBundleTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 7 1
A testBuildAddCompilerPass() 0 12 1
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