more tests

This commit is contained in:
norb 2021-01-14 17:48:41 +01:00
commit ed554705e5
3 changed files with 28 additions and 5 deletions

View file

@ -137,7 +137,7 @@ class Settings implements \Iterator
else
{
// echo "No settingsfile: $defaultConf";
throw new \ErrorException( "No settingsfile: $defaultConf" );
throw new \Exception( "No settingsfile: $defaultConf" );
// throw new FileNotFoundException();
}
@ -307,7 +307,7 @@ class Settings implements \Iterator
// Magic getter/setter methods {{{
public function __set( $name, $value )
{
// todo: throw new SettingsAreReadOnlyException();
throw new \Exception("Settings are read only. Unable to set $name to $value");
}
public function __get( $name )
@ -315,7 +315,6 @@ class Settings implements \Iterator
if ( !isset( $this->settings[$name] ) )
{
throw new \OutOfRangeException("Setting '$name' not found");
// todo: throw new SettingNotFoundException();
}
return (is_array( $this->settings[$name] ))