Skip to content

Commit

Permalink
fix currentRoute() when $_currentRoute is empty, return false
Browse files Browse the repository at this point in the history
  • Loading branch information
zoghal committed Apr 26, 2013
1 parent 720dc5e commit 4aabf72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Cake/Test/Case/Routing/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,16 @@ public function testStripPlugin() {
$this->assertEquals(Router::stripPlugin($url, null), $url);
}

/**
* testCurrentRouteWhenNonExistentRoute
*
* @return void
*/
public function testCurrentRouteWhenNonExistentRoute() {
$route = Router::currentRoute();
$this->assertFalse($route);
}

/**
* testCurrentRoute
*
Expand Down

0 comments on commit 4aabf72

Please sign in to comment.