Extends
lithium\test\Unit
Tests the creation of routes for the base URL (i.e. '/'), and that they are matched
properly given the correct parameters.
Source
public function testBaseRouteMatching() {
$route = new Route(array(
'template' => '/',
'params' => array('controller' => 'posts', 'action' => 'archive', 'page' => 1)
));
$result = $route->match(array('controller' => 'posts', 'action' => 'archive', 'page' => 1));
$this->assertEqual('/', $result);
$result = $route->match(array('controller' => 'posts', 'action' => 'archive', 'page' => 2));
$this->assertFalse($result);
$result = $route->match(array());
$this->assertFalse($result);
}