mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(tests): Adapt tests to appManager usage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
34139987d6
commit
e2a4649257
2 changed files with 6 additions and 0 deletions
|
|
@ -94,6 +94,9 @@ class ViewControllerTest extends TestCase {
|
|||
$this->appManager->expects($this->any())
|
||||
->method('getAppPath')
|
||||
->willReturnCallback(fn (string $appid): string => \OC::$SERVERROOT . '/apps/' . $appid);
|
||||
$this->appManager->expects($this->any())
|
||||
->method('isAppLoaded')
|
||||
->willReturn(true);
|
||||
|
||||
$this->cacheFactory = $this->createMock(ICacheFactory::class);
|
||||
$this->logger = $this->createMock(LoggerInterface::class);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ class RouterTest extends TestCase {
|
|||
$this->appManager->expects(self::atLeastOnce())
|
||||
->method('getAppPath')
|
||||
->willReturnCallback(fn (string $appid): string => \OC::$SERVERROOT . '/apps/' . $appid);
|
||||
$this->appManager->expects(self::atLeastOnce())
|
||||
->method('isAppLoaded')
|
||||
->willReturn(true);
|
||||
|
||||
$this->assertEquals('/index.php/apps/files/', $this->router->generate('files.view.index'));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue