matchRequest() public method

Matches a \Neos\Flow\Mvc\RequestInterface against its set host pattern rules
public matchRequest ( Neos\Flow\Mvc\RequestInterface $request ) : boolean
$request Neos\Flow\Mvc\RequestInterface The request that should be matched
return boolean TRUE if the pattern matched, FALSE otherwise
Ejemplo n.º 1
0
 /**
  * @dataProvider uriAndHostPatterns
  * @test
  */
 public function requestMatchingBasicallyWorks($uri, $pattern, $expected, $message)
 {
     $request = Request::create(new Uri($uri))->createActionRequest();
     $requestPattern = new Host(['hostPattern' => $pattern]);
     $this->assertEquals($expected, $requestPattern->matchRequest($request), $message);
 }