fix: Validate config only after the options have been set

To avoid an exception when default options are not valid but the new options are.
This commit is contained in:
Pierre Rudloff 2019-04-28 15:52:01 +02:00
parent 5456cb5506
commit 5e9768e0e7
2 changed files with 15 additions and 1 deletions

View file

@ -41,6 +41,20 @@ class ConfigTest extends BaseTest
$this->assertConfig($config);
}
/**
* Test the getInstance function.
*
* @return void
*/
public function testGetInstanceFromScratch()
{
Config::destroyInstance();
$config = Config::getInstance();
$this->assertEquals($config->convert, false);
$this->assertConfig($config);
}
/**
* Assert that a Config object is correctly instantiated.
*