aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/tests/util.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-23 12:36:34 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-23 12:36:34 +0200
commit75593f87d547b8e24105ec18434bf5bdd0aa3447 (patch)
tree66cc62877c69de00310e5b201029c6e2f6ce705f /apps/files_encryption/tests/util.php
parent42fe0b9e0865cfa81edae922e77144e789e52447 (diff)
parent1e631754d78e98d74ba0d3fb477d5eb815e9dfb3 (diff)
downloadnextcloud-server-75593f87d547b8e24105ec18434bf5bdd0aa3447.tar.gz
nextcloud-server-75593f87d547b8e24105ec18434bf5bdd0aa3447.zip
Merge pull request #11137 from owncloud/enc-pregfix
Fix share key pattern matching
Diffstat (limited to 'apps/files_encryption/tests/util.php')
-rwxr-xr-xapps/files_encryption/tests/util.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index f2db21be4c2..811530546e8 100755
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -53,12 +53,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
\OC_User::clearBackends();
\OC_User::useBackend('database');
- // Filesystem related hooks
- \OCA\Encryption\Helper::registerFilesystemHooks();
-
- // clear and register hooks
- \OC_FileProxy::clearProxies();
- \OC_FileProxy::register(new OCA\Encryption\Proxy());
+ self::setupHooks();
// create test user
\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1, true);
@@ -134,6 +129,15 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
\OC_Group::deleteGroup(self::TEST_ENCRYPTION_UTIL_GROUP2);
}
+ public static function setupHooks() {
+ // Filesystem related hooks
+ \OCA\Encryption\Helper::registerFilesystemHooks();
+
+ // clear and register hooks
+ \OC_FileProxy::clearProxies();
+ \OC_FileProxy::register(new OCA\Encryption\Proxy());
+ }
+
/**
* @medium
* test that paths set during User construction are correct