public function testSerialize() { $matcher = new RegexMatcher(array('regex' => '^/foo(\\w+)bar', 'itemNumber' => 2)); $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 testGetName() { $matcher = new RegexMatcher(array(), array()); $this->assertSame('uri:regexp', $matcher->getName()); }