You are here

public function RouteProviderTest::testEmptyPathCandidatesOutlines in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::testEmptyPathCandidatesOutlines()
  2. 9 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::testEmptyPathCandidatesOutlines()

Don't fail when given an empty path.

File

core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php, line 147
Contains \Drupal\KernelTests\Core\Routing\RouteProviderTest.

Class

RouteProviderTest
Confirm that the default route provider is working correctly.

Namespace

Drupal\KernelTests\Core\Routing

Code

public function testEmptyPathCandidatesOutlines() {
  $provider = new TestRouteProvider(Database::getConnection(), $this->state, $this->currentPath, $this->cache, $this->pathProcessor, $this->cacheTagsInvalidator, 'test_routes');
  $candidates = $provider
    ->getCandidateOutlines([]);
  $this
    ->assertCount(0, $candidates, 'Empty parts should return no candidates.');
}