ConfigurationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A tearDown() 0 4 1
A testDefaultConfig() 0 8 1
1
<?php
2
3
namespace SumoCoders\FrameworkErrorBundle\Tests\DependencyInjection;
4
5
use SumoCoders\FrameworkErrorBundle\DependencyInjection\Configuration;
6
use SumoCoders\FrameworkErrorBundle\DependencyInjection\SumoCodersFrameworkErrorExtension;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
class ConfigurationTest extends \PHPUnit_Framework_TestCase
10
{
11
    /**
12
     * @var SumoCodersFrameworkErrorExtension
13
     */
14
    protected $extension;
15
16
    /**
17
     * @var Configuration
18
     */
19
    protected $configuration;
20
21
    public function setUp()
22
    {
23
        $this->extension = new SumoCodersFrameworkErrorExtension();
24
        $this->configuration = new Configuration();
25
    }
26
27
    public function tearDown()
28
    {
29
        $this->configuration = null;
30
    }
31
32
    public function testDefaultConfig()
33
    {
34
        $container = new ContainerBuilder();
35
        $this->extension->load(array(), $container);
36
37
        $this->assertTrue($container->hasParameter('sumo_coders_framework_error.show_messages_for'));
38
        $this->assertEmpty($container->getParameter('sumo_coders_framework_error.show_messages_for'));
39
    }
40
}
41