Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-11-18 19:25:36 +0300
committerBjoern Schiessle <schiessle@owncloud.com>2014-12-02 18:03:54 +0300
commit49cfc3035944956269e7264df9fbfb202b7e096d (patch)
treee37976b7b0019a2dc551952c359a2bbe3814b191 /apps/files_encryption/tests/hooks.php
parenta90606fb14adc0aa149a87528d4f1ce61d0250e9 (diff)
upgrade to new folder structure
Diffstat (limited to 'apps/files_encryption/tests/hooks.php')
-rw-r--r--apps/files_encryption/tests/hooks.php32
1 files changed, 1 insertions, 31 deletions
diff --git a/apps/files_encryption/tests/hooks.php b/apps/files_encryption/tests/hooks.php
index fc40d4cd61f..d5a30f5074a 100644
--- a/apps/files_encryption/tests/hooks.php
+++ b/apps/files_encryption/tests/hooks.php
@@ -63,28 +63,6 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase {
'.t est.txt'
);
- // reset backend
- \OC_User::clearBackends();
- \OC_User::useBackend('database');
-
- \OC_Hook::clear('OC_Filesystem');
- \OC_Hook::clear('OC_User');
-
- // clear share hooks
- \OC_Hook::clear('OCP\\Share');
- \OC::registerShareHooks();
- \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
-
- // Filesystem related hooks
- \OCA\Encryption\Helper::registerFilesystemHooks();
-
- // Sharing related hooks
- \OCA\Encryption\Helper::registerShareHooks();
-
- // clear and register proxies
- \OC_FileProxy::clearProxies();
- \OC_FileProxy::register(new OCA\Encryption\Proxy());
-
// create test user
self::loginHelper(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1, true);
self::loginHelper(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2, true);
@@ -114,14 +92,6 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase {
\OC_User::deleteUser(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER1);
\OC_User::deleteUser(\Test_Encryption_Hooks::TEST_ENCRYPTION_HOOKS_USER2);
- \OC_Hook::clear();
- \OC_FileProxy::clearProxies();
-
- // Delete keys in /data/
- $view = new \OC\Files\View('/');
- $view->rmdir('public-keys');
- $view->rmdir('owncloud_private_key');
-
parent::tearDownAfterClass();
}
@@ -439,7 +409,7 @@ class Test_Encryption_Hooks extends \OCA\Files_Encryption\Tests\TestCase {
// set user password for the first time
\OCA\Encryption\Hooks::postCreateUser(array('uid' => 'newUser', 'password' => 'newUserPassword'));
- $this->assertTrue($view->file_exists('public-keys/newUser.publicKey'));
+ $this->assertTrue($view->file_exists(\OCA\Encryption\Keymanager::getPublicKeyPath() . '/newUser.publicKey'));
$this->assertTrue($view->file_exists('newUser/files_encryption/newUser.privateKey'));
// check if we are able to decrypt the private key