Code Duplication    Length = 14-14 lines in 2 locations

build/integration/features/bootstrap/WebDav.php 2 locations

@@ 107-120 (lines=14) @@
104
	 * @When /^Downloading last public shared file with range "([^"]*)"$/
105
	 * @param string $range
106
	 */
107
	public function downloadPublicFileWithRange($range){
108
		$token = $this->lastShareData->data->token;
109
		$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav";
110
		$headers['Range'] = $range;
111
112
		$client = new GClient();
113
		$options = [];
114
		$options['auth'] = [$token, ""];
115
116
		$request = $client->createRequest("GET", $fullUrl, $options);
117
		$request->addHeader('Range', $range);
118
119
		$this->response = $client->send($request);
120
	}
121
122
	/**
123
	 * @When /^Downloading last public shared file inside a folder "([^"]*)" with range "([^"]*)"$/
@@ 126-139 (lines=14) @@
123
	 * @When /^Downloading last public shared file inside a folder "([^"]*)" with range "([^"]*)"$/
124
	 * @param string $range
125
	 */
126
	public function downloadPublicFileInsideAFolderWithRange($path, $range){
127
		$token = $this->lastShareData->data->token;
128
		$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path";
129
		$headers['Range'] = $range;
130
131
		$client = new GClient();
132
		$options = [];
133
		$options['auth'] = [$token, ""];
134
135
		$request = $client->createRequest("GET", $fullUrl, $options);
136
		$request->addHeader('Range', $range);
137
138
		$this->response = $client->send($request);
139
	}
140
141
	/**
142
	 * @Then /^Downloaded content should be "([^"]*)"$/