Inheritance: implements eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher
コード例 #1
0
 public function testSerialize()
 {
     $matcher = new HostElement(array(1));
     $matcher->setRequest(new SimplifiedRequest(array('host' => 'ez.no', 'pathinfo' => '/foo/bar')));
     $sa = new SiteAccess('test', 'test', $matcher);
     $serializedSA1 = serialize($sa);
     $matcher->setRequest(new SimplifiedRequest(array('host' => 'ez.no', 'pathinfo' => '/foo/bar/baz')));
     $serializedSA2 = serialize($sa);
     $this->assertSame($serializedSA1, $serializedSA2);
 }
コード例 #2
0
 public function testReverseMatchFail()
 {
     $matcher = new HostElement(3);
     $matcher->setRequest(new SimplifiedRequest(array('host' => 'ez.no')));
     $this->assertNull($matcher->reverseMatch('foo'));
 }