adapt tests

This commit is contained in:
Philipp Holzer 2023-01-01 21:10:41 +01:00
commit 326566638f
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
16 changed files with 254 additions and 712 deletions

View file

@ -54,6 +54,21 @@ trait VFSTrait
$this->setConfigFile('defaults.config.php', true);
$this->setConfigFile('settings.config.php', true);
$this->setConfigFile('local.config.php');
$this->setDataFile('node.config.php');
}
protected function setDataFile(string $filename)
{
$file = dirname(__DIR__) . DIRECTORY_SEPARATOR .
'datasets' . DIRECTORY_SEPARATOR .
'config' . DIRECTORY_SEPARATOR .
$filename;
if (file_exists($file)) {
vfsStream::newFile($filename)
->at($this->root->getChild('config'))
->setContent(file_get_contents($file));
}
}
/**