Passed
Push — master ( 052950...8a74d7 )
by Theo
01:39
created

DependencyInjection/CalendarExtensionTest.php (3 issues)

1
<?php
2
3
namespace CalendarBundle\Tests\DependencyInjection;
4
5
use CalendarBundle\DependencyInjection\Configuration;
6
use CalendarBundle\DependencyInjection\CalendarExtension;
7
use PHPUnit\Framework\TestCase;
8
use Prophecy\Argument;
9
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
12
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
13
14
class CalendarExtensionTest extends TestCase
15
{
16
    public function setUp(): void
17
    {
18
        $this->builder = new ContainerBuilder();
0 ignored issues
show
Bug Best Practice introduced by
The property builder does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19
        $this->loader = new CalendarExtension();
0 ignored issues
show
Bug Best Practice introduced by
The property loader does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
20
21
        $this->configuration = [];
0 ignored issues
show
Bug Best Practice introduced by
The property configuration does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
22
    }
23
24
    public function testConfiguration()
25
    {
26
        $this->loader->load($this->configuration, $this->builder);
27
28
        $this->assertEquals($this->configuration, $this->builder->getParameterBag()->all());
29
    }
30
}
31