Skip to content

Commit 2e4e176

Browse files
committed
add test
1 parent f1b0307 commit 2e4e176

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Integration/Route/RouterTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Laminas\Diactoros\ServerRequest;
88
use Laminas\Diactoros\Stream;
99
use Laminas\Diactoros\Uri;
10+
use ReflectionException;
1011
use Tempest\Core\AppConfig;
1112
use Tempest\Database\Migrations\CreateMigrationsTable;
1213
use Tempest\Http\Responses\Ok;
@@ -94,6 +95,14 @@ public function test_generate_uri(): void
9495
$this->assertEquals('https://test.com/test/1/a/b/c/d', $router->toUri([TestController::class, 'withCustomRegexParams'], id: 1, name: 'a/b/c/d'));
9596
}
9697

98+
public function test_uri_generation_with_invalid_fqcn(): void
99+
{
100+
$router = $this->container->get(GenericRouter::class);
101+
102+
$this->expectException(ReflectionException::class);
103+
$router->toUri(TestController::class . 'Invalid');
104+
}
105+
97106
public function test_uri_generation_with_query_param(): void
98107
{
99108
$router = $this->container->get(GenericRouter::class);

0 commit comments

Comments
 (0)