Skip to content

Commit

Permalink
test: add test case for empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 10, 2023
1 parent 6f97e82 commit e1e9a7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/system/Router/RouteCollectionReverseRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ protected function getCollector(array $config = [], array $files = [], $moduleCo
return (new RouteCollection($loader, $moduleConfig, new Routing()))->setHTTPVerb('get');
}

public function testReverseRoutingEmptyString(): void
{
$routes = $this->getCollector();

$routes->add('/', 'Home::index');

$match = $routes->reverseRoute('');
$this->assertFalse($match);
}

public function testReverseRoutingFindsSimpleMatch(): void
{
$routes = $this->getCollector();
Expand Down

0 comments on commit e1e9a7b

Please sign in to comment.