aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/InfoXmlTest.php
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-09-13 17:44:38 +0200
committerGitHub <noreply@github.com>2024-09-13 17:44:38 +0200
commitbcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d (patch)
treee210686e9c6d7fdd33b7e0cc905fbd38143db0a3 /tests/lib/InfoXmlTest.php
parent032f17c7956748fd25e33edf5d85d1d25b1ee94b (diff)
parent7a16d01ea79bf8effedd5e0e9ac7c2e4b4ea41f8 (diff)
downloadnextcloud-server-bcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d.tar.gz
nextcloud-server-bcb4e781a407798ef9d071dc3a15a1d0ac9e0e8d.zip
Merge pull request #47927 from nextcloud/fix/migrate-away-from-oc_app
Migrate away from OC_App to IAppManager
Diffstat (limited to 'tests/lib/InfoXmlTest.php')
-rw-r--r--tests/lib/InfoXmlTest.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/lib/InfoXmlTest.php b/tests/lib/InfoXmlTest.php
index 702eca4c0ce..1527e363bd7 100644
--- a/tests/lib/InfoXmlTest.php
+++ b/tests/lib/InfoXmlTest.php
@@ -7,6 +7,7 @@
namespace Test;
use OCP\App\IAppManager;
+use OCP\Server;
/**
* Class InfoXmlTest
@@ -15,6 +16,13 @@ use OCP\App\IAppManager;
* @package Test
*/
class InfoXmlTest extends TestCase {
+ private IAppManager $appManager;
+
+ protected function setUp(): void {
+ parent::setUp();
+ $this->appManager = Server::get(IAppManager::class);
+ }
+
public function dataApps() {
return [
['admin_audit'],
@@ -45,8 +53,8 @@ class InfoXmlTest extends TestCase {
* @param string $app
*/
public function testClasses($app) {
- $appInfo = \OCP\Server::get(IAppManager::class)->getAppInfo($app);
- $appPath = \OC_App::getAppPath($app);
+ $appInfo = $this->appManager->getAppInfo($app);
+ $appPath = $this->appManager->getAppPath($app);
\OC_App::registerAutoloading($app, $appPath);
//Add the appcontainer