Changed data directory for work one

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

View File

@ -343,8 +343,8 @@ trait BasicStructure {
file_put_contents("../../data/$user/files" . "$filename", "$text");
}
public function createFileSpecificSize($name, $size){
$file = fopen("data/" . "$name", 'w');
public function createFileSpecificSize($name, $size) {
$file = fopen("work/" . "$name", 'w');
fseek($file, $size - 1 ,SEEK_CUR);
fwrite($file,'a'); // write a dummy char at SIZE position
fclose($file);

View File

@ -496,9 +496,9 @@ trait WebDav {
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("work/$filename"));
$this->userUploadsAFileTo($user, "work/$filename", $destination);
$this->removeFile("work/", $filename);
$userHome = $this->getUserHome($user);
PHPUnit_Framework_Assert::assertEquals(1, file_exists($userHome . "/files$destination"));
}