| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ConfigTest extends TestCase |
||
|
1 ignored issue
–
show
|
|||
| 10 | { |
||
| 11 | public function testLoad() |
||
| 12 | { |
||
| 13 | $root = vfsStream::setup(); |
||
| 14 | $file = vfsStream::newFile('test.php')->setContent("return ['key1'=> 'value1','key2'=>'value2'];"); |
||
| 15 | $root->addChild($file); |
||
| 16 | |||
| 17 | $config = new Config(); |
||
| 18 | |||
| 19 | $config->load($file->url(), 'test'); |
||
| 20 | |||
| 21 | $this->assertEquals('value1', $config->get('test.key1')); |
||
| 22 | $this->assertEquals('value2', $config->get('test.key2')); |
||
| 23 | |||
| 24 | $this->assertSame(['key1' => 'value1', 'key2' => 'value2'], $config->get('test')); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testSetAndGet() |
||
| 45 | } |
||
| 46 | } |
||
| 47 |