function LazyRouteCollectionTest::setUp

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::setUp()
  2. 11.x core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php, line 35

Class

LazyRouteCollectionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Routing%21LazyRouteCollection.php/class/LazyRouteCollection/9" title="LazyRouteCollection" class="local">\Drupal\Core\Routing\LazyRouteCollection</a>

Namespace

Drupal\Tests\Core\Routing

Code

public function setUp() : void {
    parent::setUp();
    $this->routeProvider = $this->createMock(RouteProviderInterface::class);
    $this->testRoutes = new \ArrayIterator([
        'route_1' => new Route('/route-1'),
        'route_2' => new Route('/route-2'),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.