You are here

public function ClusterRouteProviderTest::testGetRoutes in Elasticsearch Connector 8.6

Same name and namespace in other branches
  1. 8.7 tests/src/Unit/Entity/ClusterRouteProviderTest.php \Drupal\Tests\elasticsearch_connector\Unit\Entity\ClusterRouteProviderTest::testGetRoutes()
  2. 8.5 tests/src/Unit/Entity/ClusterRouteProviderTest.php \Drupal\Tests\elasticsearch_connector\Unit\Entity\ClusterRouteProviderTest::testGetRoutes()

@covers ::getRoutes

File

tests/src/Unit/Entity/ClusterRouteProviderTest.php, line 19

Class

ClusterRouteProviderTest
@coversDefaultClass \Drupal\elasticsearch_connector\Entity\ClusterRouteProvider

Namespace

Drupal\Tests\elasticsearch_connector\Unit\Entity

Code

public function testGetRoutes() {
  $cluster_route_provider = new ClusterRouteProvider();
  $entity_type = $this
    ->prophesize(EntityTypeInterface::class);

  /** @var \Symfony\Component\Routing\RouteCollection $route_collection */
  $route_collection = $cluster_route_provider
    ->getRoutes($entity_type
    ->reveal());
  $this
    ->assertEquals(4, $route_collection
    ->count());
}