summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-10-30 13:38:48 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-10-30 13:38:48 +0100
commit5f76f825737eca080cb621b2d4364015af7f6bac (patch)
treea582a2a48d0eefe2a77a6225ba3eed5bf7b9426a
parentea1ee5ba89eecd30c165c8beb1d644d79e023b32 (diff)
parent5536f6edd0f539b9fe1acae597777801250a712e (diff)
downloadnextcloud-server-5f76f825737eca080cb621b2d4364015af7f6bac.tar.gz
nextcloud-server-5f76f825737eca080cb621b2d4364015af7f6bac.zip
Merge pull request #11863 from owncloud/fix-enc-sharingtests
Properly register sharing hooks and proxies
-rwxr-xr-xapps/files_encryption/tests/share.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php
index 4a0f10b13fb..e640b8c1a6a 100755
--- a/apps/files_encryption/tests/share.php
+++ b/apps/files_encryption/tests/share.php
@@ -64,8 +64,10 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase {
// clear share hooks
\OC_Hook::clear('OCP\\Share');
+
+ // register share hooks
\OC::registerShareHooks();
- \OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
+ \OCA\Files_Sharing\Helper::registerHooks();
// Sharing related hooks
\OCA\Encryption\Helper::registerShareHooks();
@@ -75,6 +77,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase {
// clear and register hooks
\OC_FileProxy::clearProxies();
+ \OC_FileProxy::register(new OCA\Files\Share\Proxy());
\OC_FileProxy::register(new OCA\Encryption\Proxy());
// create users
@@ -104,6 +107,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase {
// we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin');
+
+ // login as first user
+ \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1);
}
function tearDown() {