aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-20 01:35:17 -0600
committerGitHub <noreply@github.com>2017-03-20 01:35:17 -0600
commitbd3d57be63779f462f85dfda760bdec3a89cd36d (patch)
tree2bc8d10f618b381b5c01b62ace66bea15e328442
parent5979f481348c0dcee099e5da8d3f2793ebc09c88 (diff)
parent190ceba22f4b2a45d7a4d511e01c53277a9904c6 (diff)
downloadnextcloud-server-bd3d57be63779f462f85dfda760bdec3a89cd36d.tar.gz
nextcloud-server-bd3d57be63779f462f85dfda760bdec3a89cd36d.zip
Merge pull request #3930 from nextcloud/downstream-27227
Added functions to add files in local_storage
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php24
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