diff --git a/Config/Config.php b/Config/Config.php index 6b34112..7862db3 100644 --- a/Config/Config.php +++ b/Config/Config.php @@ -41,7 +41,7 @@ public static function factory(array $param, $class = 'ConfigDefault') return new $class($param); } else { throw new \ErrorException( - 'Config::factory() - could not instantiate ' . $class . ' - not in self::$whitelist' + 'Config::factory() - could not instantiate ' . $class ); } } diff --git a/Config/ConfigEnv.php b/Config/ConfigEnv.php index 4fdf8f7..f7733ed 100644 --- a/Config/ConfigEnv.php +++ b/Config/ConfigEnv.php @@ -63,7 +63,7 @@ private function mergeEnvironments($param) $toMerge ); } else { - $merged = $config->get($this->defaultEnv); + $merged = $config->get($this->defaultEnv, []); } $this->setByArray( diff --git a/Test/BaseConfigTest.php b/Test/BaseConfigTest.php index cd452c9..2ba9c68 100644 --- a/Test/BaseConfigTest.php +++ b/Test/BaseConfigTest.php @@ -34,7 +34,7 @@ public function setUp() $this->root = vfsStream::setup('configs'); $this->configFile = vfsStream::newFile('default.yml')->at($this->root); - $this->configFile->setContent(TestData::getYamlConfigFile()); + $this->configFile->setContent(TestData::getYamlImportConfigFile()); $this->configImportFile = vfsStream::newFile('testimport.yml')->at($this->root); $this->configImportFile->setContent(TestData::getYamlImportFile()); diff --git a/Test/TestData.php b/Test/TestData.php index c576435..05e7b88 100644 --- a/Test/TestData.php +++ b/Test/TestData.php @@ -15,6 +15,7 @@ class TestData public static function getYamlImportFile() { return << $this->getTestYaml(), + 'file' => TestData::getYamlConfigFile(), 'filecheck' => false, ], 'ConfigEnv'