aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/App/AppManagerTest.php4
-rw-r--r--tests/lib/InfoXmlTest.php12
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php
index 82a3f0d2045..ac470c00335 100644
--- a/tests/lib/App/AppManagerTest.php
+++ b/tests/lib/App/AppManagerTest.php
@@ -341,7 +341,7 @@ class AppManagerTest extends TestCase {
$manager->expects($this->once())
->method('getAppPath')
->with('test')
- ->willReturn(null);
+ ->willReturn('');
$manager->expects($this->once())
->method('getAppInfo')
@@ -402,7 +402,7 @@ class AppManagerTest extends TestCase {
$manager->expects($this->once())
->method('getAppPath')
->with('test')
- ->willReturn(null);
+ ->willReturn('');
$manager->expects($this->once())
->method('getAppInfo')
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