mirror of
https://github.com/friendica/friendica
synced 2025-04-27 16:30:10 +00:00
Add tests for HookFileManager
This commit is contained in:
parent
a9178e6982
commit
527622df4a
2 changed files with 245 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue