Moved Mocking usage
Adding more documentation
This commit is contained in:
parent
551efde226
commit
70e240691e
6 changed files with 65 additions and 9 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue