Completed
Push — master ( 6c5dbb...baecc5 )
by
unknown
05:19
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
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\DoctrineORMAdminBundle\Tests;
15
16
use PHPUnit\Framework\TestCase;
17
use Prophecy\Argument;
18
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddAuditEntityCompilerPass;
19
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddGuesserCompilerPass;
20
use Sonata\DoctrineORMAdminBundle\DependencyInjection\Compiler\AddTemplatesCompilerPass;
21
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
22
use Symfony\Component\DependencyInjection\ContainerBuilder;
23
24
/**
25
 * @author Marko Kunic <[email protected]>
26
 */
27
class SonataDoctrineORMAdminBundleTest extends TestCase
28
{
29
    public function testBuild(): void
30
    {
31
        $containerBuilder = $this->prophesize(ContainerBuilder::class);
32
33
        $containerBuilder
34
            ->addCompilerPass(Argument::type(AddGuesserCompilerPass::class))
35
            ->shouldBeCalledTimes(1);
36
37
        $containerBuilder
38
            ->addCompilerPass(Argument::type(AddTemplatesCompilerPass::class))
39
            ->shouldBeCalledTimes(1);
40
41
        $containerBuilder
42
            ->addCompilerPass(Argument::type(AddAuditEntityCompilerPass::class))
43
            ->shouldBeCalledTimes(1);
44
45
        $bundle = new SonataDoctrineORMAdminBundle();
46
        $bundle->build($containerBuilder->reveal());
47
    }
48
}
49