You are here

public function MenuLegacyTest::testMenuUiGetMenus in Drupal 9

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