diff options
author | Sergio Bertolin <sbertolin@solidgear.es> | 2017-03-01 10:10:30 +0000 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-19 22:05:20 -0600 |
commit | 190ceba22f4b2a45d7a4d511e01c53277a9904c6 (patch) | |
tree | 50c720e57957a7ca3d4be31d69f7373c13fa00cc /build/integration | |
parent | 528a903a7b23ea628e6ec2fc9a221821297c0bec (diff) | |
download | nextcloud-server-190ceba22f4b2a45d7a4d511e01c53277a9904c6.tar.gz nextcloud-server-190ceba22f4b2a45d7a4d511e01c53277a9904c6.zip |
Added functions to add files in local_storage
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'build/integration')
-rw-r--r-- | build/integration/features/bootstrap/BasicStructure.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 8e1fcf86ba1..8961efc6f31 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -353,6 +353,30 @@ trait BasicStructure { 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 * @param string $user |