class MenuUninstallTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php \Drupal\Tests\menu_ui\Functional\MenuUninstallTest
- 9 core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php \Drupal\Tests\menu_ui\Functional\MenuUninstallTest
Tests that uninstalling menu does not remove custom menus.
@group menu_ui
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\menu_ui\Functional\MenuUninstallTest
Expanded class hierarchy of MenuUninstallTest
File
- core/
modules/ menu_ui/ tests/ src/ Functional/ MenuUninstallTest.php, line 13
Namespace
Drupal\Tests\menu_ui\FunctionalView source
class MenuUninstallTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'menu_ui',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests Menu uninstall.
*/
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.');
}
}