lithium\tests\cases\net\http\RouteTest::testBaseRouteMatching PHP Method

testBaseRouteMatching() public method

Tests the creation of routes for the base URL (i.e. '/'), and that they are matched properly given the correct parameters.
    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);
    }