eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterURITextTest::testReverseMatch PHP Method

testReverseMatch() public method

public testReverseMatch ( )
    public function testReverseMatch()
    {
        $semanticURI = '/hihi/hoho';
        $matcher = new URITextMatcher(array('prefix' => 'foo', 'suffix' => 'bar'));
        $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => $semanticURI)));
        $result = $matcher->reverseMatch('something');
        $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIText', $result);
        $request = $result->getRequest();
        $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest', $request);
        $this->assertSame("/foosomethingbar{$semanticURI}", $request->pathinfo);
    }