You are here

public function UrlMatcherTest::testHostIsCaseInsensitive in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\UrlMatcherTest::testHostIsCaseInsensitive()

File

vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php, line 411

Class

UrlMatcherTest

Namespace

Symfony\Component\Routing\Tests\Matcher

Code

public function testHostIsCaseInsensitive() {
  $coll = new RouteCollection();
  $coll
    ->add('foo', new Route('/', array(), array(
    'locale' => 'EN|FR|DE',
  ), array(), '{locale}.example.com'));
  $matcher = new UrlMatcher($coll, new RequestContext('', 'GET', 'en.example.com'));
  $this
    ->assertEquals(array(
    '_route' => 'foo',
    'locale' => 'en',
  ), $matcher
    ->match('/'));
}