function DefaultHtmlRouteProviderTest::testGetCollectionRoute

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute()
  2. 10 core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute()
  3. 9 core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute()
  4. 8.9.x core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php \Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::testGetCollectionRoute()

Tests get collection route.

Attributes

#[DataProvider('providerTestGetCollectionRoute')]

File

core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php, line 282

Class

DefaultHtmlRouteProviderTest
Tests Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider.

Namespace

Drupal\Tests\Core\Entity\Routing

Code

public function testGetCollectionRoute(?Route $expected, EntityTypeInterface $entity_type) : void {
  $route = $this->routeProvider
    ->getCollectionRoute($entity_type);
  $this->assertEquals($expected, $route);
}

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