Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions build/integration/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public function downloadFileWithRange($fileSource, $range){
public function downloadPublicFileWithRange($range){
$token = $this->lastShareData->data->token;
$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav";
$headers['Range'] = $range;

$client = new GClient();
$options = [];
Expand All @@ -189,7 +188,6 @@ public function downloadPublicFileWithRange($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 = [];
Expand Down Expand Up @@ -437,16 +435,17 @@ public function makeSabrePath($user, $path) {
public function getSabreClient($user) {
$fullUrl = substr($this->baseUrl, 0, -4);

$settings = array(
$settings = [
'baseUri' => $fullUrl,
'userName' => $user,
);
];

if ($user === 'admin') {
$settings['password'] = $this->adminUser[1];
} else {
$settings['password'] = $this->regularUser;
}
$settings['authType'] = SClient::AUTH_BASIC;

return new SClient($settings);
}
Expand Down Expand Up @@ -634,15 +633,17 @@ public function userUnfavoritesElement($user, $path){
/*Set the elements of a proppatch, $folderDepth requires 1 to see elements without children*/
public function changeFavStateOfAnElement($user, $path, $favOrUnfav, $folderDepth, $properties = null){
$fullUrl = substr($this->baseUrl, 0, -4);
$settings = array(
$settings = [
'baseUri' => $fullUrl,
'userName' => $user,
);
];
if ($user === 'admin') {
$settings['password'] = $this->adminUser[1];
} else {
$settings['password'] = $this->regularUser;
}
$settings['authType'] = SClient::AUTH_BASIC;

$client = new SClient($settings);
if (!$properties) {
$properties = [
Expand Down