Skip to content

Commit e1e9a7b

Browse files
committed
test: add test case for empty string
1 parent 6f97e82 commit e1e9a7b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/system/Router/RouteCollectionReverseRouteTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ protected function getCollector(array $config = [], array $files = [], $moduleCo
5252
return (new RouteCollection($loader, $moduleConfig, new Routing()))->setHTTPVerb('get');
5353
}
5454

55+
public function testReverseRoutingEmptyString(): void
56+
{
57+
$routes = $this->getCollector();
58+
59+
$routes->add('/', 'Home::index');
60+
61+
$match = $routes->reverseRoute('');
62+
$this->assertFalse($match);
63+
}
64+
5565
public function testReverseRoutingFindsSimpleMatch(): void
5666
{
5767
$routes = $this->getCollector();

0 commit comments

Comments
 (0)