public function MenuUninstallTest::testMenuUninstall in Drupal 9
Same name and namespace in other branches
- 8 core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php \Drupal\Tests\menu_ui\Functional\MenuUninstallTest::testMenuUninstall()
Tests Menu uninstall.
File
- core/
modules/ menu_ui/ tests/ src/ Functional/ MenuUninstallTest.php, line 30
Class
- MenuUninstallTest
- Tests that uninstalling menu does not remove custom menus.
Namespace
Drupal\Tests\menu_ui\FunctionalCode
public function testMenuUninstall() {
\Drupal::service('module_installer')
->uninstall([
'menu_ui',
]);
\Drupal::entityTypeManager()
->getStorage('menu')
->resetCache([
'admin',
]);
$this
->assertNotEmpty(Menu::load('admin'), 'The \'admin\' menu still exists after uninstalling Menu UI module.');
}