aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2020-08-07 11:12:09 +0000
committerGitHub <noreply@github.com>2020-08-07 11:12:09 +0000
commita3d30bf4a23f3827103dd3ba5e10c16a58362a80 (patch)
treefbab4b630f55d242fc7fdc2f80571946497fc098 /apps/files_sharing
parenta2c262b68a0c64b808f77a8db4a1772f009de9de (diff)
parente84504c4d6a079d55d2f78ad21b1ad20d53035bb (diff)
downloadnextcloud-server-a3d30bf4a23f3827103dd3ba5e10c16a58362a80.tar.gz
nextcloud-server-a3d30bf4a23f3827103dd3ba5e10c16a58362a80.zip
Merge pull request #21954 from nextcloud/techdebt/noid/bootstrap-files_trashbin
Use IBootstrap for the files_trashbin app
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/SharedStorageTest.php6
-rw-r--r--apps/files_sharing/tests/UpdaterTest.php7
2 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php
index fb8207a3c1d..e3e57cc73a4 100644
--- a/apps/files_sharing/tests/SharedStorageTest.php
+++ b/apps/files_sharing/tests/SharedStorageTest.php
@@ -31,6 +31,8 @@ namespace OCA\Files_Sharing\Tests;
use OC\Files\View;
use OCA\Files_Sharing\SharedStorage;
+use OCA\Files_Trashbin\AppInfo\Application;
+use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\Files\NotFoundException;
use OCP\Share\IShare;
@@ -42,7 +44,9 @@ use OCP\Share\IShare;
class SharedStorageTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- \OCA\Files_Trashbin\Trashbin::registerHooks();
+ // register trashbin hooks
+ $trashbinApp = new Application();
+ $trashbinApp->boot($this->createMock(IBootContext::class));
$this->folder = '/folder_share_storage_test';
$this->filename = '/share-api-storage.txt';
diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php
index 30efbac533d..344c08bea48 100644
--- a/apps/files_sharing/tests/UpdaterTest.php
+++ b/apps/files_sharing/tests/UpdaterTest.php
@@ -31,6 +31,8 @@
namespace OCA\Files_Sharing\Tests;
+use OCA\Files_Trashbin\AppInfo\Application;
+use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\Share\IShare;
/**
@@ -77,8 +79,9 @@ class UpdaterTest extends TestCase {
$status = \OC::$server->getAppManager()->isEnabledForUser('files_trashbin');
(new \OC_App())->enable('files_trashbin');
-
- \OCA\Files_Trashbin\Trashbin::registerHooks();
+ // register trashbin hooks
+ $trashbinApp = new Application();
+ $trashbinApp->boot($this->createMock(IBootContext::class));
$fileinfo = \OC\Files\Filesystem::getFileInfo($this->folder);
$this->assertTrue($fileinfo instanceof \OC\Files\FileInfo);