summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/WebDav.php
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2016-04-13 14:43:55 +0000
committerSergio Bertolin <sbertolin@solidgear.es>2016-04-13 14:43:55 +0000
commitab40ec649476956c92efc261cb47a9a053351c7c (patch)
treee2e668b44b2d1997d042f9e71b94e9839f49a071 /build/integration/features/bootstrap/WebDav.php
parent009f96cb83b68553c73892bcce37c689d0e6d083 (diff)
downloadnextcloud-server-ab40ec649476956c92efc261cb47a9a053351c7c.tar.gz
nextcloud-server-ab40ec649476956c92efc261cb47a9a053351c7c.zip
Added test case about downloading a file inside a folder with range
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r--build/integration/features/bootstrap/WebDav.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 2ef5f252f11..e6975518a84 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -100,6 +100,25 @@ trait WebDav {
}
/**
+ * @When /^Downloading last public shared file inside a folder "([^"]*)" with range "([^"]*)"$/
+ * @param string $range
+ */
+ public function downloadPublicFileInsideAFolderWithRange($path, $range){
+ $token = $this->lastShareData->data->token;
+ $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path";
+ $headers['Range'] = $range;
+
+ $client = new GClient();
+ $options = [];
+ $options['auth'] = [$token, ""];
+
+ $request = $client->createRequest("GET", $fullUrl, $options);
+ $request->addHeader('Range', $range);
+
+ $this->response = $client->send($request);
+ }
+
+ /**
* @Then /^Downloaded content should be "([^"]*)"$/
* @param string $content
*/