function SystemFunctionsLegacyTest::testSystemGetModuleAdminTasksDeprecation

Tests system_get_module_admin_tasks() deprecation.

See also

system_get_module_admin_tasks()

drupal_static_reset()

File

core/modules/system/tests/src/Kernel/System/SystemFunctionsLegacyTest.php, line 49

Class

SystemFunctionsLegacyTest
Tests the deprecations in the system module.

Namespace

Drupal\Tests\system\Kernel\System

Code

public function testSystemGetModuleAdminTasksDeprecation() : void {
    $this->expectDeprecation("system_get_module_admin_tasks() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the 'system.module_admin_links_helper' service with the getModuleAdminLinks() method and 'user.module_permissions_link_helper' service with the ::getModulePermissionsLink() method instead. See https://www.drupal.org/node/3038972");
    system_get_module_admin_tasks('foo', 'Foo');
    $this->expectDeprecation("Calling drupal_static_reset() with 'system_get_module_admin_tasks' as an argument is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. There is no replacement for this usage. See https://www.drupal.org/node/3038972");
    drupal_static_reset('system_get_module_admin_tasks');
}

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