From 34139987d609386c3351c46fd60b0f932795b6df Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 24 Feb 2025 12:44:50 +0100 Subject: fix: Replace OC_App calls by IAppManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/files_sharing/tests/UpdaterTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/files_sharing/tests') diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index 70e644f9207..efdbeebdf3f 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -59,8 +59,9 @@ class UpdaterTest extends TestCase { * that the mount point doesn't end up at the trash bin */ public function testDeleteParentFolder(): void { - $status = Server::get(IAppManager::class)->isEnabledForUser('files_trashbin'); - (new \OC_App())->enable('files_trashbin'); + $appManager = Server::get(IAppManager::class); + $status = $appManager->isEnabledForUser('files_trashbin'); + $appManager->enableApp('files_trashbin'); // register trashbin hooks $trashbinApp = new Application(); @@ -116,7 +117,7 @@ class UpdaterTest extends TestCase { $rootView->deleteAll('files_trashin'); if ($status === false) { - Server::get(IAppManager::class)->disableApp('files_trashbin'); + $appManager->disableApp('files_trashbin'); } Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); -- cgit v1.2.3