aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/WebDav.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2017-08-10 12:14:02 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-12-15 14:46:44 +0100
commit74df27b7a756d948e6df94cda3fda9585ae78f7c (patch)
treeba87d3e060b1507faad73f6a0ad51daa38463b33 /build/integration/features/bootstrap/WebDav.php
parent8c5d656f3b605a8cedbf412b7498b936e12866e6 (diff)
downloadnextcloud-server-74df27b7a756d948e6df94cda3fda9585ae78f7c.tar.gz
nextcloud-server-74df27b7a756d948e6df94cda3fda9585ae78f7c.zip
Add integration tests for length header on new chunking
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r--build/integration/features/bootstrap/WebDav.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 5d6ca0633b6..1354c0b1978 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -595,6 +595,23 @@ trait WebDav {
], null, "uploads");
}
+ /**
+ * @Then user :user moves new chunk file with id :id to :dest with size :size
+ */
+ public function userMovesNewChunkFileWithIdToMychunkedfileWithSize($user, $id, $dest, $size)
+ {
+ $source = '/uploads/' . $user . '/' . $id . '/.file';
+ $destination = substr($this->baseUrl, 0, -4) . $this->getDavFilesPath($user) . $dest;
+
+ try {
+ $this->response = $this->makeDavRequest($user, 'MOVE', $source, [
+ 'Destination' => $destination,
+ 'OC-Total-Length' => $size
+ ], null, "uploads");
+ } catch(\GuzzleHttp\Exception\BadResponseException $ex) {
+ $this->response = $ex->getResponse();
+ }
+ }
/**
* @Given /^Downloading file "([^"]*)" as "([^"]*)"$/