You are here

protected function ModuleConfigureRouteTest::assertModuleConfigureRoutesExist in Drupal 10

Asserts the configure routes of a module exist.

@internal

Parameters

string $module_name: The name of the module.

array $module_info: An array module info.

2 calls to ModuleConfigureRouteTest::assertModuleConfigureRoutesExist()
ModuleConfigureRouteTest::testDeprecatedModuleConfigureRoutes in core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
Tests if the module with lifecycle deprecated configure routes exists.
ModuleConfigureRouteTest::testModuleConfigureRoutes in core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
Tests if the module configure routes exists.

File

core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php, line 96

Class

ModuleConfigureRouteTest
Tests the configure route for core modules.

Namespace

Drupal\KernelTests\Core\Extension

Code

protected function assertModuleConfigureRoutesExist(string $module_name, array $module_info) : void {
  $route = $this->routeProvider
    ->getRouteByName($module_info['configure']);
  $this
    ->assertNotEmpty($route, sprintf('The configure route for the "%s" module was found.', $module_name));
}