function MenuLegacyTest::testListSystemMenus

Tests deprecation of the menu_list_system_menus() function.

File

core/tests/Drupal/KernelTests/Core/Menu/MenuLegacyTest.php, line 30

Class

MenuLegacyTest
Deprecation test cases for the menu layer.

Namespace

Drupal\KernelTests\Core\Menu

Code

public function testListSystemMenus() : void {
    $this->expectDeprecation('menu_list_system_menus() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\system\\Entity\\Menu::loadMultiple() instead. See https://www.drupal.org/node/3027453');
    $this->assertSame([
        'tools' => 'Tools',
        'admin' => 'Administration',
        'account' => 'User account menu',
        'main' => 'Main navigation',
        'footer' => 'Footer menu',
    ], menu_list_system_menus());
}

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