function LazyRouteCollectionTest::testGetIterator
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::testGetIterator()
- 11.x core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::testGetIterator()
@covers ::getIterator @covers ::all
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ LazyRouteCollectionTest.php, line 48
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\RoutingCode
public function testGetIterator() {
$this->routeProvider
->expects($this->exactly(2))
->method('getRoutesByNames')
->with(NULL)
->willReturn($this->testRoutes);
$lazyRouteCollection = new LazyRouteCollection($this->routeProvider);
$this->assertEquals($this->testRoutes, $lazyRouteCollection->getIterator());
$this->assertEquals($this->testRoutes, $lazyRouteCollection->all());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.