diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-12 16:17:19 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-13 10:08:43 +0200 |
commit | 7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc (patch) | |
tree | d6c7117c08cd346c300fab6f8de9baedcbaca8a8 /tests/apps.php | |
parent | c9e4598360335d7eab0f4a5153dbf16a1f161351 (diff) | |
download | nextcloud-server-7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc.tar.gz nextcloud-server-7ed583cb8ee64f77696b0e23f79d8d1b4038bcbc.zip |
chore: Migrate cleanAppId and getAppPath calls to IAppManager from OC_App
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/apps.php')
-rw-r--r-- | tests/apps.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/apps.php b/tests/apps.php index c01e364c0a8..c2015fecda9 100644 --- a/tests/apps.php +++ b/tests/apps.php @@ -44,10 +44,15 @@ function getSubclasses($parentClassName): array { } $apps = OC_App::getEnabledApps(); +$appManager = \OCP\Server::get(\OCP\App\IAppManager::class); foreach ($apps as $app) { - $dir = OC_App::getAppPath($app); - if (is_dir($dir . '/tests')) { - loadDirectory($dir . '/tests'); + try { + $dir = $appManager->getAppPath($app); + if (is_dir($dir . '/tests')) { + loadDirectory($dir . '/tests'); + } + } catch (\OCP\App\AppPathNotFoundException) { + /* ignore */ } } |