Test Failed
Push — master ( 37023c...961468 )
by Theo
01:47
created

CalendarExtensionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConfiguration() 0 5 1
A setUp() 0 6 1
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