function LazyRouteCollectionTest::testCount

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::testCount()
  2. 11.x core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php \Drupal\Tests\Core\Routing\LazyRouteCollectionTest::testCount()

@covers ::count

File

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

Class

LazyRouteCollectionTest
@coversDefaultClass \Drupal\Core\Routing\LazyRouteCollection

Namespace

Drupal\Tests\Core\Routing

Code

public function testCount() : void {
    $this->routeProvider
        ->method('getRoutesByNames')
        ->with(NULL)
        ->willReturn($this->testRoutes);
    $lazyRouteCollection = new LazyRouteCollection($this->routeProvider);
    $this->assertEquals(2, $lazyRouteCollection->count());
}

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