Passed
Push — master ( a71cc4...1302d4 )
by Vincent
21:00 queued 11:57
created

ConfigurationTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 39
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A test_cache_pool() 0 12 1
A test_cache_service() 0 12 1
A test_default_config() 0 9 1
1
<?php
2
3
namespace Bdf\SerializerBundle\Tests\DependencyInjection;
4
5
use Bdf\SerializerBundle\DependencyInjection\Configuration;
6
use PHPUnit\Framework\TestCase;
7
use Symfony\Component\Config\Definition\Processor;
8
9
/**
10
 * ConfigurationTest
11
 */
12
class ConfigurationTest extends TestCase
13
{
14
    public function test_default_config()
15
    {
16
        $globalconfig = [
17
        ];
18
19
        $processor = new Processor();
20
        $config = $processor->processConfiguration(new Configuration(), [$globalconfig]);
21
22
        $this->assertEquals([], $config);
23
    }
24
25
    public function test_cache_pool()
26
    {
27
        $globalconfig = [
28
            'cache' => [
29
                'pool' => 'ServiceID'
30
            ]
31
        ];
32
33
        $processor = new Processor();
34
        $config = $processor->processConfiguration(new Configuration(), [$globalconfig]);
35
36
        $this->assertEquals($globalconfig, $config);
37
    }
38
39
    public function test_cache_service()
40
    {
41
        $globalconfig = [
42
            'cache' => [
43
                'service' => 'ServiceID'
44
            ]
45
        ];
46
47
        $processor = new Processor();
48
        $config = $processor->processConfiguration(new Configuration(), [$globalconfig]);
49
50
        $this->assertEquals($globalconfig, $config);
51
    }
52
}
53