diff options
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 17 |
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 "([^"]*)"$/ |