Commit 08fa0138 authored by Sergio Bertolin's avatar Sergio Bertolin
Browse files

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

parent 97ed4075
......@@ -637,6 +637,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
......
......@@ -467,7 +467,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"));
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment