Skip to content

Commit

Permalink
Add test for unmatched reverse route with closure
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner authored May 14, 2019
1 parent ce657f5 commit 92ee0ca
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/system/Router/RouteCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,15 +947,21 @@ public function testReverseRoutingWithClosure()
{
$routes = $this->getCollector();

$routes->add(
'login', function () {
}
);
$routes->add('login', function() { });

$match = $routes->reverseRoute('login');

$this->assertEquals('/login', $match);
}

public function testReverseRoutingWithClosureNoMatch()
{
$routes = $this->getCollector();

$routes->add('login', function() { });

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

//--------------------------------------------------------------------

Expand Down

0 comments on commit 92ee0ca

Please sign in to comment.