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

testRouteMatchingWithOnlyInserts() public method

Test matching routes with only insert parameters and no default values.
    public function testRouteMatchingWithOnlyInserts()
    {
        Router::connect('/{:controller}');
        $this->assertIdentical('/posts', Router::match(array('controller' => 'posts')));
        $expected = "No parameter match found for URL `('controller' => 'Posts', ";
        $expected .= "'action' => 'view')`.";
        $this->assertException($expected, function () {
            Router::match(array('controller' => 'posts', 'action' => 'view'));
        });
    }
RouterTest