public function RequestMatcherTest::testHost in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestMatcherTest.php \Symfony\Component\HttpFoundation\Tests\RequestMatcherTest::testHost()
@dataProvider testHostFixture
File
- vendor/
symfony/ http-foundation/ Tests/ RequestMatcherTest.php, line 68
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testHost($pattern, $isMatch) {
$matcher = new RequestMatcher();
$request = Request::create('', 'get', array(), array(), array(), array(
'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));
}