Bukashk0zzzBooleanTypeExtensionTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace Bukashk0zzz\BooleanTypeBundle\Tests\DependencyInjection;
4
5
use Bukashk0zzz\BooleanTypeBundle\DependencyInjection\Bukashk0zzzBooleanTypeExtension;
6
use PHPUnit\Framework\TestCase;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * @internal
11
 */
12
final class Bukashk0zzzBooleanTypeExtensionTest extends TestCase
13
{
14
    /**
15
     * @var Bukashk0zzzBooleanTypeExtension Bukashk0zzzBooleanTypeExtension
16
     */
17
    private $extension;
18
19
    /**
20
     * @var ContainerBuilder Container builder
21
     */
22
    private $container;
23
24
    protected function setUp(): void
25
    {
26
        $this->extension = new Bukashk0zzzBooleanTypeExtension();
27
        $this->container = new ContainerBuilder();
28
        $this->container->registerExtension($this->extension);
29
    }
30
31
    /**
32
     * Test load extension.
33
     */
34
    public function testLoadExtension(): void
35
    {
36
        $this->container->loadFromExtension($this->extension->getAlias());
37
        $this->container->compile();
38
39
        // Check that services have been loaded
40
        self::assertTrue($this->container->has('boolean.type'));
41
    }
42
}
43