function ModuleConfigureRouteTest::assertModuleConfigureRoutesExist

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php \Drupal\KernelTests\Core\Extension\ModuleConfigureRouteTest::assertModuleConfigureRoutesExist()
  2. 11.x core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php \Drupal\KernelTests\Core\Extension\ModuleConfigureRouteTest::assertModuleConfigureRoutesExist()

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));
}

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