Moved Mocking usage

Adding more documentation
This commit is contained in:
Philipp Holzer 2018-10-31 10:24:07 +01:00
commit 70e240691e
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
6 changed files with 65 additions and 9 deletions

View file

@ -13,6 +13,9 @@ trait VFSTrait
*/
protected $root;
/**
* Sets up the Virtual File System for Friendica with common files (config, dbstructure)
*/
protected function setUpVfsDir() {
// the used directories inside the App class
$structure = [
@ -29,6 +32,11 @@ trait VFSTrait
$this->setConfigFile('dbstructure.php');
}
/**
* Copying a config file from the file system to the Virtual File System
*
* @param string $filename The filename of the config file
*/
protected function setConfigFile($filename)
{
$file = dirname(__DIR__) . DIRECTORY_SEPARATOR .
@ -43,6 +51,11 @@ trait VFSTrait
}
}
/**
* Delets a config file from the Virtual File System
*
* @param string $filename The filename of the config file
*/
protected function delConfigFile($filename)
{
if ($this->root->hasChild('config/' . $filename)) {