diff options
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index b56a1b7d2f6..2ef5f252f11 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -316,6 +316,20 @@ trait WebDav { } /** + * @When User :user uploads file with content :content to :destination + */ + public function userUploadsAFileWithContentTo($user, $content, $destination) + { + $file = \GuzzleHttp\Stream\Stream::factory($content); + try { + $this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file); + } catch (\GuzzleHttp\Exception\ServerException $e) { + // 4xx and 5xx responses cause an exception + $this->response = $e->getResponse(); + } + } + + /** * @When User :user deletes file :file * @param string $user * @param string $file |