summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/tests/stream.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/tests/stream.php')
-rw-r--r--apps/files_encryption/tests/stream.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php
index f4824935ca0..8295ddd9523 100644
--- a/apps/files_encryption/tests/stream.php
+++ b/apps/files_encryption/tests/stream.php
@@ -20,13 +20,13 @@
*
*/
-use OCA\Encryption;
+namespace OCA\Files_Encryption\Tests;
/**
- * Class Test_Encryption_Stream
+ * Class Stream
* this class provide basic stream tests
*/
-class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
+class Stream extends TestCase {
const TEST_ENCRYPTION_STREAM_USER1 = "test-stream-user1";
@@ -43,16 +43,16 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
parent::setUpBeforeClass();
// create test user
- self::loginHelper(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1, true);
+ self::loginHelper(self::TEST_ENCRYPTION_STREAM_USER1, true);
}
protected function setUp() {
parent::setUp();
// set user id
- \OC_User::setUserId(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1);
- $this->userId = \Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1;
- $this->pass = \Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1;
+ \OC_User::setUserId(self::TEST_ENCRYPTION_STREAM_USER1);
+ $this->userId = self::TEST_ENCRYPTION_STREAM_USER1;
+ $this->pass = self::TEST_ENCRYPTION_STREAM_USER1;
// init filesystem view
$this->view = new \OC\Files\View('/');
@@ -61,7 +61,7 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
$this->dataShort = 'hats';
// remember files_trashbin state
- $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
+ $this->stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
// we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin');
@@ -70,10 +70,10 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
protected function tearDown() {
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
- OC_App::enable('files_trashbin');
+ \OC_App::enable('files_trashbin');
}
else {
- OC_App::disable('files_trashbin');
+ \OC_App::disable('files_trashbin');
}
parent::tearDown();
@@ -81,7 +81,7 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
public static function tearDownAfterClass() {
// cleanup test user
- \OC_User::deleteUser(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1);
+ \OC_User::deleteUser(self::TEST_ENCRYPTION_STREAM_USER1);
parent::tearDownAfterClass();
}
@@ -208,7 +208,7 @@ class Test_Encryption_Stream extends \OCA\Files_Encryption\Tests\TestCase {
file_put_contents($tmpFilename, $encryptedContent);
- \OCA\Encryption\Helper::addTmpFileToMapper($tmpFilename, $filename);
+ \OCA\Files_Encryption\Helper::addTmpFileToMapper($tmpFilename, $filename);
// try to read the file from /tmp
$handle = fopen("crypt://".$tmpFilename, "r");