Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class XMLConfigTest extends AbstractConfigTest |
||
14 | { |
||
15 | public function test_constructMissing() : void |
||
16 | { |
||
17 | // test for not existing config file |
||
18 | $this->expectError(); |
||
19 | $cfg = new XMLConfig('missing.xml'); |
||
20 | $cfg->getString('test'); |
||
21 | } |
||
22 | |||
23 | public function test_constructInvalid() : void |
||
24 | { |
||
25 | $this->expectError(); |
||
26 | $cfg = new XMLConfig(dirname(__FILE__) . '/testdata/InvalidConfig.xml'); |
||
27 | $cfg->getString('test'); |
||
28 | } |
||
29 | |||
30 | public function test_constructNull() : AbstractConfig |
||
31 | { |
||
32 | $cfg = new XMLConfig(dirname(__FILE__) . '/testdata/TestConfig.xml'); |
||
33 | $this->assertIsObject($cfg); |
||
34 | |||
35 | return $cfg; |
||
36 | } |
||
37 | |||
38 | public function test_construct() : AbstractConfig |
||
39 | { |
||
40 | $cfg = new XMLConfig(dirname(__FILE__) . '/testdata/TestConfig.xml'); |
||
41 | $this->assertIsObject($cfg); |
||
42 | |||
43 | return $cfg; |
||
44 | } |
||
47 |