JsonConfigTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testLoadConfig() 0 19 1
1
<?php
2
/**
3
 * test Event Object class
4
 *
5
 * @package     BlueEvent
6
 * @subpackage  Test
7
 * @author      Michał Adamiak    <[email protected]>
8
 * @copyright   chajr/bluetree
9
 */
10
namespace BlueEventTest\Config;
11
12
use BlueEvent\Event\Config\JsonConfig;
13
use PHPUnit\Framework\TestCase;
14
15
class JsonConfigTest extends TestCase
16
{
17
    public function testLoadConfig()
18
    {
19
        $arrayConfig = new JsonConfig;
20
        $config = $arrayConfig->readConfig(
21
            __DIR__ . '/testConfig/config.json'
22
        );
23
24
        $this->assertEquals(
25
            [
26
                'test_event_code' => [
27
                    'object'    => 'BlueEvent\Event\BaseEvent',
28
                    'listeners' => [
29
                        'ClassOne::method',
30
                        'ClassSecond::method',
31
                        'someFunction',
32
                    ]
33
                ]
34
            ],
35
            $config
36
        );
37
    }
38
}
39