Inheritance: implements eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher, implements eZ\Publish\Core\MVC\Symfony\SiteAccess\URILexer
 /**
  * @dataProvider reverseMatchProvider
  */
 public function testReverseMatch($siteAccessName, $originalPathinfo)
 {
     $matcher = new URIElementMatcher(1);
     $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => $originalPathinfo)));
     $result = $matcher->reverseMatch($siteAccessName);
     $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement', $result);
     $this->assertSame("/{$siteAccessName}{$originalPathinfo}", $result->getRequest()->pathinfo);
     $this->assertSame("/{$siteAccessName}/some/linked/uri", $result->analyseLink('/some/linked/uri'));
     $this->assertSame("/foo/bar/baz", $result->analyseURI("/{$siteAccessName}/foo/bar/baz"));
 }
 public function testSerialize()
 {
     $matcher = new URIElementMatcher(1);
     $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => '/foo/bar')));
     $sa = new SiteAccess('test', 'test', $matcher);
     $serializedSA1 = serialize($sa);
     $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => '/foo/bar/baz')));
     $serializedSA2 = serialize($sa);
     $this->assertSame($serializedSA1, $serializedSA2);
 }
 public function testReverseMatchFail()
 {
     $matcher = new URIElementMatcher(2);
     $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => "/my/siteaccess/foo/bar")));
     $this->assertNull($matcher->reverseMatch('another_siteaccess_again_dont_tell_me'));
 }