Merge pull request #3930 from nextcloud/downstream-27227

Added functions to add files in local_storage
This commit is contained in:
Morris Jobke 2017-03-20 01:35:17 -06:00 committed by GitHub
commit bd3d57be63
1 changed files with 24 additions and 0 deletions

View File

@ -353,6 +353,30 @@ trait BasicStructure {
fclose($file); fclose($file);
} }
public function createFileWithText($name, $text){
$file = fopen("work/" . "$name", 'w');
fwrite($file, $text);
fclose($file);
}
/**
* @Given file :filename of size :size is created in local storage
* @param string $filename
* @param string $size
*/
public function fileIsCreatedInLocalStorageWithSize($filename, $size) {
$this->createFileSpecificSize("local_storage/$filename", $size);
}
/**
* @Given file :filename with text :text is created in local storage
* @param string $filename
* @param string $text
*/
public function fileIsCreatedInLocalStorageWithText($filename, $text) {
$this->createFileWithText("local_storage/$filename", $text);
}
/** /**
* @When User :user empties trashbin * @When User :user empties trashbin
* @param string $user * @param string $user