public function UrlMatcherTest::testWithHost in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\UrlMatcherTest::testWithHost()
File
- vendor/
symfony/ routing/ Tests/ Matcher/ UrlMatcherTest.php, line 364
Class
Namespace
Symfony\Component\Routing\Tests\MatcherCode
public function testWithHost() {
$coll = new RouteCollection();
$coll
->add('foo', new Route('/foo/{foo}', array(), array(), array(), '{locale}.example.com'));
$matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com'));
$this
->assertEquals(array(
'foo' => 'bar',
'_route' => 'foo',
'locale' => 'en',
), $matcher
->match('/foo/bar'));
}