Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(tests): Adapt tests to appManager usage
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Feb 24, 2025
commit e2a46492577e95ad5d790befaa62d74eb2393b87
3 changes: 3 additions & 0 deletions apps/files/tests/Controller/ViewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ protected function setUp(): void {
$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);
Expand Down
3 changes: 3 additions & 0 deletions tests/lib/Route/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function testGenerateConsecutively(): void {
$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'));

Expand Down