$this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers);
}
+ /**
+ * @When /^Downloading file "([^"]*)" with range "([^"]*)"$/
+ */
+ public function downloadFileWithRange($fileSource, $range){
+ $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath;
+ $headers['Range'] = $range;
+ $this->response = $this->makeDavRequest($this->currentUser, "GET", $fileSource, $headers);
+ }
+
+ /**
+ * @Then /^Downloaded content should be "([^"]*)"$/
+ */
+ public function downloadedContentShouldBe($content){
+ PHPUnit_Framework_Assert::assertEquals($content, (string)$this->response->getBody());
+ }
+
/*Returns the elements of a propfind, $folderDepth requires 1 to see elements without children*/
public function listFolder($user, $path, $folderDepth){
$fullUrl = substr($this->baseUrl, 0, -4);
When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt"
Then the HTTP status code should be "201"
+ Scenario: download a file with range
+ Given using dav path "remote.php/webdav"
+ And As an "admin"
+ When Downloading file "/welcome.txt" with range "bytes=51-77"
+ Then Downloaded content should be "example file for developers"
+