Completed
Push — master ( e4a43c...c6b5e7 )
by Tomáš
15:17
created

BundleParametersTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A testBundleParameters() 0 5 1
A getSymfonyContainerAdapter() 0 6 1
1
<?php
2
3
namespace Symplify\NetteAdapterForSymfonyBundles\Tests\Container;
4
5
use Nette\DI\Container;
6
use PHPUnit\Framework\TestCase;
7
use Symplify\NetteAdapterForSymfonyBundles\DI\NetteAdapterForSymfonyBundlesExtension;
8
use Symplify\NetteAdapterForSymfonyBundles\SymfonyContainerAdapter;
9
use Symplify\NetteAdapterForSymfonyBundles\Tests\ContainerFactory;
10
11
final class BundleParametersTest extends TestCase
12
{
13
    /**
14
     * @var Container
15
     */
16
    private $container;
17
18
    public function __construct()
19
    {
20
        $this->container = (new ContainerFactory())->createWithConfig(
21
            __DIR__.'/SymfonyContainerAdapterSource/config/init.neon'
22
        );
23
    }
24
25
    public function testBundleParameters()
26
    {
27
        $symfonyContainerAdapter = $this->getSymfonyContainerAdapter();
28
        $this->assertTrue($symfonyContainerAdapter->hasParameter('doctrine.orm.proxy_namespace'));
29
    }
30
31
    private function getSymfonyContainerAdapter() : SymfonyContainerAdapter
32
    {
33
        return $this->container->getService(
34
            NetteAdapterForSymfonyBundlesExtension::SYMFONY_CONTAINER_SERVICE_NAME
35
        );
36
    }
37
}
38