Completed
Pull Request — master (#812)
by
unknown
05:20 queued 01:45
created

SonataDoctrineORMAdminBundleTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBuild() 0 19 1
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