function ModuleConfigureRouteTest::doTestDeprecatedModuleConfigureRoutes

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

Check the configure route for a single module.

1 call to ModuleConfigureRouteTest::doTestDeprecatedModuleConfigureRoutes()
ModuleConfigureRouteTest::testDeprecatedModuleConfigureRoutes in core/tests/Drupal/KernelTests/Core/Extension/ModuleConfigureRouteTest.php
Tests if the module with lifecycle deprecated configure routes exists.

File

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

Class

ModuleConfigureRouteTest
Tests the configure route for core modules.

Namespace

Drupal\KernelTests\Core\Extension

Code

protected function doTestDeprecatedModuleConfigureRoutes(string $module_name) : void {
    $module_info = $this->moduleInfo[$module_name]->info;
    if (!isset($module_info['configure'])) {
        return;
    }
    $module_lifecycle = $module_info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER];
    if (isset($module_lifecycle) && $module_lifecycle !== ExtensionLifecycle::DEPRECATED) {
        return;
    }
    $this->container
        ->get('module_installer')
        ->install([
        $module_name,
    ]);
    $this->assertModuleConfigureRoutesExist($module_name, $module_info);
}

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