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

testMatchingEmptyRoute() public method

Tests that a successful match against a route with template '/' operating at the root of a domain never returns an empty string.
    public function testMatchingEmptyRoute()
    {
        $route = new Route(array('template' => '/', 'params' => array('controller' => 'users', 'action' => 'view')));
        $request = new Request(array('base' => '/'));
        $url = $route->match(array('controller' => 'users', 'action' => 'view'), $request);
        $this->assertEqual('/', $url);
        $request = new Request(array('base' => ''));
        $url = $route->match(array('controller' => 'users', 'action' => 'view'), $request);
        $this->assertEqual('/', $url);
    }