You are here

public function MenuUninstallTest::testMenuUninstall in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_ui/src/Tests/MenuUninstallTest.php \Drupal\menu_ui\Tests\MenuUninstallTest::testMenuUninstall()

Tests Menu uninstall.

File

core/modules/menu_ui/src/Tests/MenuUninstallTest.php, line 30
Contains \Drupal\menu_ui\Tests\MenuUninstallTest.

Class

MenuUninstallTest
Tests that uninstalling menu does not remove custom menus.

Namespace

Drupal\menu_ui\Tests

Code

public function testMenuUninstall() {
  \Drupal::service('module_installer')
    ->uninstall(array(
    'menu_ui',
  ));
  \Drupal::entityManager()
    ->getStorage('menu')
    ->resetCache(array(
    'admin',
  ));
  $this
    ->assertTrue(Menu::load('admin'), 'The \'admin\' menu still exists after uninstalling Menu UI module.');
}