diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 5b245f33e230..a816c298449d 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -312,7 +312,7 @@ public function emptyTrashbin($user) { } public function createFileSpecificSize($name, $size){ - $file = fopen("data/" . "$name", 'w'); + $file = fopen("work/" . "$name", 'w'); fseek($file, $size - 1 ,SEEK_CUR); fwrite($file,'a'); // write a dummy char at SIZE position fclose($file); diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index f4ac9f3346a3..7e8509f95f31 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -637,6 +637,19 @@ public function userHasUnlimitedQuota($user) $this->userHasAQuotaOf($user, 'none'); } + /** + * Returns home path of the given user + * @param string $user + */ + 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 diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 97aaf4fffabc..dd05a5551748 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -441,10 +441,11 @@ public function userUploadsAFileTo($user, $source, $destination) public function userAddsAFileTo($user, $bytes, $destination){ $filename = "filespecificSize.txt"; $this->createFileSpecificSize($filename, $bytes); - 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")); + PHPUnit_Framework_Assert::assertEquals(1, file_exists("work/$filename")); + $this->userUploadsAFileTo($user, "work/$filename", $destination); + $this->removeFile("work/", $filename); + $expectedElements = new \Behat\Gherkin\Node\TableNode([["$destination"]]); + $this->checkElementList($user, $expectedElements); } /**