Completed
Push — 3.x ( b582dd...8b3829 )
by Jordi Sala
01:51
created

SonataDoctrineORMAdminBundleTest::testBuild()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 19
rs 9.4285
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\DoctrineORMAdminBundle\Tests;
13
14
use PHPUnit\Framework\TestCase;
15
use Prophecy\Argument;
16
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddAuditEntityCompilerPass;
17
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddGuesserCompilerPass;
18
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddTemplatesCompilerPass;
19
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
22
/**
23
 * @author Marko Kunic <[email protected]>
24
 */
25
class SonataDoctrineORMAdminBundleTest extends TestCase
26
{
27
    public function testBuild()
28
    {
29
        $containerBuilder = $this->prophesize(ContainerBuilder::class);
30
31
        $containerBuilder
32
            ->addCompilerPass(Argument::type(AddGuesserCompilerPass::class))
33
            ->shouldBeCalledTimes(1);
34
35
        $containerBuilder
36
            ->addCompilerPass(Argument::type(AddTemplatesCompilerPass::class))
37
            ->shouldBeCalledTimes(1);
38
39
        $containerBuilder
40
            ->addCompilerPass(Argument::type(AddAuditEntityCompilerPass::class))
41
            ->shouldBeCalledTimes(1);
42
43
        $bundle = new SonataDoctrineORMAdminBundle();
44
        $bundle->build($containerBuilder->reveal());
45
    }
46
}
47