function MenuLegacyTest::testMenuUiGetMenus

Tests deprecation of the menu_ui_get_menus() function.

File

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

Class

MenuLegacyTest
Deprecation test cases for the menu layer.

Namespace

Drupal\KernelTests\Core\Menu

Code

public function testMenuUiGetMenus() : void {
    $this->expectDeprecation('menu_ui_get_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([
        'admin' => 'Administration',
        'footer' => 'Footer',
        'main' => 'Main navigation',
        'tools' => 'Tools',
        'account' => 'User account menu',
    ], menu_ui_get_menus());
}

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