X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FUtil%2FVFSTrait.php;h=53d37f85c81be96443acc7765af5786c78a1a338;hb=1301a53f20a5164d484a3a83368d4eb9174523ae;hp=110f24a61ae38e4a54b8c03dcfcb0ac1b3b0ce2f;hpb=92fb0a82ca9b62065647a8c34134030415a67c55;p=friendica.git diff --git a/tests/Util/VFSTrait.php b/tests/Util/VFSTrait.php index 110f24a61a..53d37f85c8 100644 --- a/tests/Util/VFSTrait.php +++ b/tests/Util/VFSTrait.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Test\Util; @@ -23,11 +42,14 @@ trait VFSTrait 'bin' => [], 'static' => [], 'test' => [], + 'logs' => [], + 'config2' => [], ]; // create a virtual directory and copy all needed files and folders to it $this->root = vfsStream::setup('friendica', 0777, $structure); + $this->setConfigFile('dbstructure.config.php', true); $this->setConfigFile('defaults.config.php', true); $this->setConfigFile('settings.config.php', true); $this->setConfigFile('local.config.php'); @@ -37,9 +59,9 @@ trait VFSTrait * Copying a config file from the file system to the Virtual File System * * @param string $filename The filename of the config file - * @param bool $static True, if the folder `static` instead of `config` should be used + * @param bool $static True, if the folder `static` instead of `config` should be used */ - protected function setConfigFile($filename, bool $static = false) + protected function setConfigFile(string $filename, bool $static = false) { $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . @@ -57,9 +79,9 @@ trait VFSTrait * Delets a config file from the Virtual File System * * @param string $filename The filename of the config file - * @param bool $static True, if the folder `static` instead of `config` should be used + * @param bool $static True, if the folder `static` instead of `config` should be used */ - protected function delConfigFile($filename, bool $static = false) + protected function delConfigFile(string $filename, bool $static = false) { if ($this->root->hasChild(($static ? 'static' : 'config') . '/' . $filename)) { $this->root->getChild(($static ? 'static' : 'config'))->removeChild($filename);