summaryrefslogtreecommitdiffstats
path: root/tests/lib/Route
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-23 15:32:51 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-02-07 11:23:31 +0100
commit77c8c9c80549e6e3a906fb84324488148e56c874 (patch)
tree63dda73a033b5fcea48d7ad8b7b5dec10b46064c /tests/lib/Route
parentcd885b57057b506169faf8ac455f5b1fba811bbf (diff)
downloadnextcloud-server-77c8c9c80549e6e3a906fb84324488148e56c874.tar.gz
nextcloud-server-77c8c9c80549e6e3a906fb84324488148e56c874.zip
Improve error output on failed Router test
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/Route')
-rw-r--r--tests/lib/Route/RouterTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/Route/RouterTest.php b/tests/lib/Route/RouterTest.php
index 9affa978bf0..e67c4518cb0 100644
--- a/tests/lib/Route/RouterTest.php
+++ b/tests/lib/Route/RouterTest.php
@@ -36,7 +36,12 @@ class RouterTest extends TestCase {
public function testGenerateConsecutively(): void {
/** @var LoggerInterface $logger */
$logger = $this->createMock(LoggerInterface::class);
- $logger->expects($this->never())->method('info');
+ $logger->method('info')
+ ->willReturnCallback(
+ function (string $message, array $data) {
+ $this->fail('Unexpected info log: '.(string)($data['exception'] ?? $message));
+ }
+ );
$router = new Router($logger);
$this->assertEquals('/index.php/apps/files/', $router->generate('files.view.index'));