1
0
Fork 0

Add tests for HookFileManager

This commit is contained in:
Philipp Holzer 2023-07-16 22:41:56 +02:00
commit 527622df4a
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
2 changed files with 245 additions and 2 deletions

View file

@ -104,13 +104,13 @@ class HookFileManager
$configFile = $this->basePath . '/' . static::STATIC_DIR . '/' . static::CONFIG_NAME . '.config.php';
if (!file_exists($configFile)) {
throw new HookConfigException(sprintf('config file %s does not exit.', $configFile));
throw new HookConfigException(sprintf('config file %s does not exist.', $configFile));
}
$config = include $configFile;
if (!is_array($config)) {
throw new HookConfigException('Error loading config file ' . $configFile);
throw new HookConfigException(sprintf('Error loading config file %s.', $configFile));
}
$this->hookConfig = array_merge_recursive($config, $this->addonLoader->getActiveAddonConfig(static::CONFIG_NAME));