public function RouteCollectionTest::testIteratorWithOverriddenRoutes

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php, line 67

Class

RouteCollectionTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testIteratorWithOverriddenRoutes() {
  $collection = new RouteCollection();
  $collection
    ->add('foo', new Route('/foo'));
  $collection1 = new RouteCollection();
  $collection
    ->addCollection($collection1);
  $collection1
    ->add('foo', new Route('/foo1'));
  $this
    ->assertEquals('/foo1', $this
    ->getFirstNamedRoute($collection, 'foo')
    ->getPattern());
}