lithium\tests\cases\net\http\RouterTest::testRouteMatchingWithNoInserts PHP Method

testRouteMatchingWithNoInserts() public method

Tests matching routes where the route template is a static string with no insert parameters.
    public function testRouteMatchingWithNoInserts()
    {
        Router::connect('/login', array('controller' => 'sessions', 'action' => 'add'));
        $result = Router::match(array('controller' => 'sessions', 'action' => 'add'));
        $this->assertIdentical('/login', $result);
        $expected = "No parameter match found for URL `('controller' => 'Sessions', ";
        $expected .= "'action' => 'index')`.";
        $this->assertException($expected, function () {
            Router::match(array('controller' => 'sessions', 'action' => 'index'));
        });
    }
RouterTest