Test Failed
Branch main (1f2fe7)
by Stefan
01:54
created

INIConfigTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 3
1
<?php
2
declare(strict_types=1);
3
4
namespace SKien\Test\Config;
5
6
use SKien\Config\AbstractConfig;
7
use SKien\Config\INIConfig;
8
9
/**
10
 * @author Stefanius <[email protected]>
11
 * @copyright MIT License - see the LICENSE file for details
12
 */
13
class INIConfigTest extends AbstractConfigTest
14
{
15
    public function test_constructMissing() : void
16
    {
17
        // test for not existing config file
18
        $this->expectError();
19
        $cfg = new INIConfig('missing.ini');
20
        $cfg->getString('test');
21
    }
22
    
23
    public function test_constructNull() : AbstractConfig
24
    {
25
        $cfg = new INIConfig(dirname(__FILE__) . '/testdata/TestConfig.ini');
26
        $this->assertIsObject($cfg);
27
        
28
        return $cfg;
29
    }
30
    
31
    public function test_construct() : AbstractConfig
32
    {
33
        $cfg = new INIConfig(dirname(__FILE__) . '/testdata/TestConfig.ini');
34
        $this->assertIsObject($cfg);
35
        
36
        return $cfg;
37
    }
38
}
39
40