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_encryption/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_encryption/tests')
-rwxr-xr-x | apps/files_encryption/tests/encryption.php | 4 | ||||
-rwxr-xr-x | apps/files_encryption/tests/stream.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index 24b3bbcaf40..00466cc671c 100755 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -27,14 +27,14 @@ class Test_Encryption extends UnitTestCase { $this->assertNotEqual($encrypted,$source); $this->assertEqual($decrypted,$source); - $tmpFileEncrypted=OCP\Util::tmpFile(); + $tmpFileEncrypted=OCP\Files::tmpFile(); OC_Crypt::encryptfile($file,$tmpFileEncrypted,$key); $encrypted=file_get_contents($tmpFileEncrypted); $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); $this->assertNotEqual($encrypted,$source); $this->assertEqual($decrypted,$source); - $tmpFileDecrypted=OCP\Util::tmpFile(); + $tmpFileDecrypted=OCP\Files::tmpFile(); OC_Crypt::decryptfile($tmpFileEncrypted,$tmpFileDecrypted,$key); $decrypted=file_get_contents($tmpFileDecrypted); $this->assertEqual($decrypted,$source); diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 225e82c99e8..b23805d60b0 100755 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -22,7 +22,7 @@ class Test_CryptStream extends UnitTestCase { $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $source=fopen($file,'r'); $target=$this->getStream('test2','w'); - OCP\Util::streamCopy($source,$target); + OCP\Files::streamCopy($source,$target); fclose($target); fclose($source); @@ -44,7 +44,7 @@ class Test_CryptStream extends UnitTestCase { $id=uniqid(); } if(!isset($this->tmpFiles[$id])){ - $file=OCP\Util::tmpFile(); + $file=OCP\Files::tmpFile(); $this->tmpFiles[$id]=$file; }else{ $file=$this->tmpFiles[$id]; |