$this->
assertTrue($matcher->
matches($httpRequest));
} /**
* @dataProvider getHostData
*/
public function testHost($pattern,
$isMatch) { $matcher =
new RequestMatcher();
$request = Request::
create('', 'get',
[],
[],
[],
['HTTP_HOST' => 'foo.example.com'
]);
$matcher->
matchHost($pattern);
$this->
assertSame($isMatch,
$matcher->
matches($request));
$matcher =
new RequestMatcher(null,
$pattern);
$this->
assertSame($isMatch,
$matcher->
matches($request));
} public function testPort() { $matcher =
new RequestMatcher();
$request = Request::
create('', 'get',
[],
[],
[],
['HTTP_HOST' => null, 'SERVER_PORT' => 8000
]);