test Exceptions

This commit is contained in:
norb 2021-01-14 13:53:02 +01:00
commit 81c9247571
3 changed files with 16 additions and 1 deletions

View file

@ -82,9 +82,20 @@ class SettingsTest extends TestCase
$this->assertIsObject($nested);
$this->assertIsIterable($nested);
$this->assertEquals(1, $nested->level);
$this->assertEquals(2, $nested->nested->level);
$this->assertEquals('default', $nested->testFiles);
}
/**
* @depends testLoad
*/
public function testSettingNotFound(Settings $cfg)
{
$this->assertEquals('default', $cfg->testFiles);
$this->expectException(\OutOfRangeException::class);
$cfg->keyDoesNotExist;
}
/**
*/
public function testSiteOverride()