Skip to content
Snippets Groups Projects
Commit bd3d57be authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #3930 from nextcloud/downstream-27227

Added functions to add files in local_storage
parents 5979f481 190ceba2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment