diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-22 22:11:01 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-23 22:03:14 +0200 |
commit | e84504c4d6a079d55d2f78ad21b1ad20d53035bb (patch) | |
tree | b1ac43a8573169257ee0c8d56d1dfd406cf68f59 /apps/files_sharing/tests | |
parent | c842678f0a1fb65981a03302895192ddc58479c9 (diff) | |
download | nextcloud-server-e84504c4d6a079d55d2f78ad21b1ad20d53035bb.tar.gz nextcloud-server-e84504c4d6a079d55d2f78ad21b1ad20d53035bb.zip |
Use IBootstrap for the files_trashbin app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/SharedStorageTest.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/UpdaterTest.php | 7 |
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); |