You are here

public function RouteCollectionTest::testAddCollectionWithResources 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::testAddCollectionWithResources()

File

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

Class

RouteCollectionTest

Namespace

Symfony\Component\Routing\Tests

Code

public function testAddCollectionWithResources() {
  $collection = new RouteCollection();
  $collection
    ->addResource($foo = new FileResource(__DIR__ . '/Fixtures/foo.xml'));
  $collection1 = new RouteCollection();
  $collection1
    ->addResource($foo1 = new FileResource(__DIR__ . '/Fixtures/foo1.xml'));
  $collection
    ->addCollection($collection1);
  $this
    ->assertEquals(array(
    $foo,
    $foo1,
  ), $collection
    ->getResources(), '->addCollection() merges resources');
}