diff options
author | Robin Appelman <robin@icewind.nl> | 2023-02-13 14:47:50 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-02-13 22:51:14 +0100 |
commit | b911da3e1eedff9f7df683889f0d425d47a6fd1c (patch) | |
tree | 98f290ad2f92c5aed25717f9f973ee112ba8b05e /tests/lib/Route | |
parent | b68be794644ad1e125257ab4b05e80356655537a (diff) | |
download | nextcloud-server-b911da3e1eedff9f7df683889f0d425d47a6fd1c.tar.gz nextcloud-server-b911da3e1eedff9f7df683889f0d425d47a6fd1c.zip |
DI for Router
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Route')
-rw-r--r-- | tests/lib/Route/RouterTest.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/lib/Route/RouterTest.php b/tests/lib/Route/RouterTest.php index 44fef6f1d4f..301058f74a6 100644 --- a/tests/lib/Route/RouterTest.php +++ b/tests/lib/Route/RouterTest.php @@ -24,6 +24,10 @@ declare(strict_types=1); namespace Test\Route; use OC\Route\Router; +use OCP\Diagnostics\IEventLogger; +use OCP\IConfig; +use OCP\IRequest; +use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; use Test\TestCase; @@ -44,7 +48,13 @@ class RouterTest extends TestCase { $this->fail('Unexpected info log: '.(string)($data['exception'] ?? $message)); } ); - $router = new Router($logger); + $router = new Router( + $logger, + $this->createMock(IRequest::class), + $this->createMock(IConfig::class), + $this->createMock(IEventLogger::class), + $this->createMock(ContainerInterface::class), + ); $this->assertEquals('/index.php/apps/files/', $router->generate('files.view.index')); |