diff options
Diffstat (limited to 'tests/lib/NavigationManagerTest.php')
-rw-r--r-- | tests/lib/NavigationManagerTest.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 63160e78de7..beefc2353d6 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -224,19 +224,19 @@ class NavigationManagerTest extends TestCase { ->method('isEnabledForUser') ->with('theming') ->willReturn(true); - $this->appManager->expects($this->once())->method('getAppInfo')->with('test')->willReturn($navigation); - /* + $this->appManager->expects($this->once()) + ->method('getAppInfo') + ->with('test') + ->willReturn($navigation); + $this->urlGenerator->expects($this->any()) + ->method('imagePath') + ->willReturnCallback(function ($appName, $file) { + return "/apps/$appName/img/$file"; + }); $this->appManager->expects($this->any()) - ->method('getAppInfo') - ->will($this->returnValueMap([ - ['test', null, null, $navigation], - ['theming', null, null, null], - ])); - */ + ->method('getAppIcon') + ->willReturnCallback(fn (string $appName) => "/apps/$appName/img/app.svg"); $this->l10nFac->expects($this->any())->method('get')->willReturn($l); - $this->urlGenerator->expects($this->any())->method('imagePath')->willReturnCallback(function ($appName, $file) { - return "/apps/$appName/img/$file"; - }); $this->urlGenerator->expects($this->any())->method('linkToRoute')->willReturnCallback(function ($route) { if ($route === 'core.login.logout') { return 'https://example.com/logout'; @@ -534,6 +534,7 @@ class NavigationManagerTest extends TestCase { ->with('theming') ->willReturn(true); $this->appManager->expects($this->once())->method('getAppInfo')->with('test')->willReturn($navigation); + $this->appManager->expects($this->once())->method('getAppIcon')->with('test')->willReturn('/apps/test/img/app.svg'); $this->l10nFac->expects($this->any())->method('get')->willReturn($l); $this->urlGenerator->expects($this->any())->method('imagePath')->willReturnCallback(function ($appName, $file) { return "/apps/$appName/img/$file"; |