You are here

public function LazyRouteCollectionTest::testCount in Drupal 10

Same name and namespace in other branches
  1. 9 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 61

Class

LazyRouteCollectionTest
@coversDefaultClass \Drupal\Core\Routing\LazyRouteCollection

Namespace

Drupal\Tests\Core\Routing

Code

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