You are here

public function RouteCollectionTest::testSetHost in Zircon Profile 8

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

File

vendor/symfony/routing/Tests/RouteCollectionTest.php, line 234

Class

RouteCollectionTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testSetHost() {
  $collection = new RouteCollection();
  $routea = new Route('/a');
  $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net');
  $collection
    ->add('a', $routea);
  $collection
    ->add('b', $routeb);
  $collection
    ->setHost('{locale}.example.com');
  $this
    ->assertEquals('{locale}.example.com', $routea
    ->getHost());
  $this
    ->assertEquals('{locale}.example.com', $routeb
    ->getHost());
}