diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 12:54:31 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 12:54:31 +0200 |
commit | 8c7f8546716ac77cdeaa134caf9fae22232ce213 (patch) | |
tree | 80c98f5aaf0274e5c38c3d55af9400a720552745 /apps/files_archive/tests | |
parent | f1830866a3f20e50c3d409d3cdd508a98fc56377 (diff) | |
download | nextcloud-server-8c7f8546716ac77cdeaa134caf9fae22232ce213.tar.gz nextcloud-server-8c7f8546716ac77cdeaa134caf9fae22232ce213.zip |
move all the files stuff into a files class
Diffstat (limited to 'apps/files_archive/tests')
-rwxr-xr-x | apps/files_archive/tests/archive.php | 8 | ||||
-rwxr-xr-x | apps/files_archive/tests/storage.php | 2 | ||||
-rwxr-xr-x | apps/files_archive/tests/tar.php | 2 | ||||
-rwxr-xr-x | apps/files_archive/tests/zip.php | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_archive/tests/archive.php b/apps/files_archive/tests/archive.php index 512afe9e915..1779127c932 100755 --- a/apps/files_archive/tests/archive.php +++ b/apps/files_archive/tests/archive.php @@ -55,7 +55,7 @@ abstract class Test_Archive extends UnitTestCase { $textFile=$dir.'/lorem.txt'; $this->assertEqual(file_get_contents($textFile),$this->instance->getFile('lorem.txt')); - $tmpFile=OCP\Util::tmpFile('.txt'); + $tmpFile=OCP\Files::tmpFile('.txt'); $this->instance->extractFile('lorem.txt',$tmpFile); $this->assertEqual(file_get_contents($textFile),file_get_contents($tmpFile)); } @@ -89,7 +89,7 @@ abstract class Test_Archive extends UnitTestCase { $this->instance=$this->getNew(); $fh=$this->instance->getStream('lorem.txt','w'); $source=fopen($dir.'/lorem.txt','r'); - OCP\Util::streamCopy($source,$fh); + OCP\Files::streamCopy($source,$fh); fclose($source); fclose($fh); $this->assertTrue($this->instance->fileExists('lorem.txt')); @@ -109,13 +109,13 @@ abstract class Test_Archive extends UnitTestCase { public function testExtract(){ $dir=OC::$SERVERROOT.'/apps/files_archive/tests/data'; $this->instance=$this->getExisting(); - $tmpDir=OCP\Util::tmpFolder(); + $tmpDir=OCP\Files::tmpFolder(); $this->instance->extract($tmpDir); $this->assertEqual(true,file_exists($tmpDir.'lorem.txt')); $this->assertEqual(true,file_exists($tmpDir.'dir/lorem.txt')); $this->assertEqual(true,file_exists($tmpDir.'logo-wide.png')); $this->assertEqual(file_get_contents($dir.'/lorem.txt'),file_get_contents($tmpDir.'lorem.txt')); - OCP\Util::rmdirr($tmpDir); + OCP\Files::rmdirr($tmpDir); } public function testMoveRemove(){ $dir=OC::$SERVERROOT.'/apps/files_archive/tests/data'; diff --git a/apps/files_archive/tests/storage.php b/apps/files_archive/tests/storage.php index 52d6a4296e9..7ebcce4ac6f 100755 --- a/apps/files_archive/tests/storage.php +++ b/apps/files_archive/tests/storage.php @@ -13,7 +13,7 @@ class Test_Filestorage_Archive_Zip extends Test_FileStorage { private $tmpFile; public function setUp(){ - $this->tmpFile=OCP\Util::tmpFile('.zip'); + $this->tmpFile=OCP\Files::tmpFile('.zip'); $this->instance=new OC_Filestorage_Archive(array('archive'=>$this->tmpFile)); } diff --git a/apps/files_archive/tests/tar.php b/apps/files_archive/tests/tar.php index c543c226bef..c138a51a651 100755 --- a/apps/files_archive/tests/tar.php +++ b/apps/files_archive/tests/tar.php @@ -16,7 +16,7 @@ if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){ } protected function getNew(){ - return new OC_Archive_TAR(OCP\Util::tmpFile('.tar.gz')); + return new OC_Archive_TAR(OCP\Files::tmpFile('.tar.gz')); } } }else{ diff --git a/apps/files_archive/tests/zip.php b/apps/files_archive/tests/zip.php index b22ea3b79e9..615c9e3c7e2 100755 --- a/apps/files_archive/tests/zip.php +++ b/apps/files_archive/tests/zip.php @@ -16,7 +16,7 @@ if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){ } protected function getNew(){ - return new OC_Archive_ZIP(OCP\Util::tmpFile('.zip')); + return new OC_Archive_ZIP(OCP\Files::tmpFile('.zip')); } } }else{ |