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

testNamedAnchor() public method

public testNamedAnchor ( )
    public function testNamedAnchor()
    {
        Router::connect('/{:controller}/{:action}');
        Router::connect('/{:controller}/{:action}/{:id:[0-9]+}', array('id' => null));
        $result = Router::match(array('Posts::edit', '#' => 'foo'));
        $this->assertIdentical('/posts/edit#foo', $result);
        $result = Router::match(array('Posts::edit', 'id' => 42, '#' => 'foo'));
        $this->assertIdentical('/posts/edit/42#foo', $result);
        $result = Router::match(array('controller' => 'users', 'action' => 'view', '#' => 'blah'));
        $this->assertIdentical('/users/view#blah', $result);
        $result = Router::match(array('controller' => 'users', 'action' => 'view', 'id' => 47, '#' => 'blargh'));
        $this->assertIdentical('/users/view/47#blargh', $result);
    }
RouterTest