ConfigurationTest::tearDown()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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