BundleParametersTest::testBundleParameters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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