test nested Settings
This commit is contained in:
parent
0b3957a2de
commit
f18ea38350
2 changed files with 18 additions and 1 deletions
|
@ -73,6 +73,18 @@ class SettingsTest extends TestCase
|
|||
$this->assertEquals('prod', $cfg->mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testLoad
|
||||
*/
|
||||
public function testNestedSettings(Settings $cfg)
|
||||
{
|
||||
$nested = $cfg->nested;
|
||||
$this->assertIsObject($nested);
|
||||
$this->assertIsIterable($nested);
|
||||
$this->assertEquals(1, $nested->level);
|
||||
$this->assertEquals('default', $nested->testFiles);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public function testSiteOverride()
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php return [
|
||||
'mode' => 'prod',
|
||||
'testFiles' => 'default',
|
||||
'answer' => false
|
||||
'answer' => false,
|
||||
'nested' =>
|
||||
[
|
||||
'level' => 1,
|
||||
'testFiles' => 'default',
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue