Added support for homes which doesn't have user's name

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Sergio Bertolin 2016-12-22 10:07:01 +00:00 committed by Lukas Reschke
parent 91c87d3a7a
commit 4480dca3e3
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with 11 additions and 1 deletions

View File

@ -704,6 +704,15 @@ trait Provisioning {
$this->userHasAQuotaOf($user, 'none');
}
public function getUserHome($user) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user";
$client = new Client();
$options = [];
$options['auth'] = $this->adminUser;
$this->response = $client->get($fullUrl, $options);
return $this->response->xml()->data[0]->home;
}
/**
* @BeforeScenario
* @AfterScenario

View File

@ -499,7 +499,8 @@ trait WebDav {
PHPUnit_Framework_Assert::assertEquals(1, file_exists("data/$filename"));
$this->userUploadsAFileTo($user, "data/$filename", $destination);
$this->removeFile("data/", $filename);
PHPUnit_Framework_Assert::assertEquals(1, file_exists("../../data/$user/files$destination"));
$userHome = $this->getUserHome($user);
PHPUnit_Framework_Assert::assertEquals(1, file_exists($userHome . "/files$destination"));
}
/**