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:
parent
5456cb5506
commit
5e9768e0e7
2 changed files with 15 additions and 1 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue