diff options
Diffstat (limited to 'apps/files_trashbin/tests/trashbin.php')
-rw-r--r-- | apps/files_trashbin/tests/trashbin.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php index b3176ebbe92..bf6446389f1 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/trashbin.php @@ -26,7 +26,7 @@ use OCA\Files_Trashbin; /** - * Class Test_Encryption_Crypt + * Class Test_Encryption */ class Test_Trashbin extends \Test\TestCase { @@ -36,7 +36,6 @@ class Test_Trashbin extends \Test\TestCase { private $trashRoot1; private $trashRoot2; - private static $encryptionStatus; private static $rememberRetentionObligation; private static $rememberAutoExpire; @@ -58,7 +57,6 @@ class Test_Trashbin extends \Test\TestCase { \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup'); //disable encryption - self::$encryptionStatus = \OC_App::isEnabled('files_encryption'); \OC_App::disable('files_encryption'); //configure trashbin @@ -82,10 +80,6 @@ class Test_Trashbin extends \Test\TestCase { // cleanup test user \OC_User::deleteUser(self::TEST_TRASHBIN_USER1); - if (self::$encryptionStatus === true) { - \OC_App::enable('files_encryption'); - } - \OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation); \OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire); @@ -312,6 +306,12 @@ class Test_Trashbin extends \Test\TestCase { } } + $storage = new \ReflectionClass('\OC\Files\Storage\Shared'); + $isInitialized = $storage->getProperty('isInitialized'); + $isInitialized->setAccessible(true); + $isInitialized->setValue(array()); + $isInitialized->setAccessible(false); + \OC_Util::tearDownFS(); \OC_User::setUserId(''); \OC\Files\Filesystem::tearDown(); |