
| Current Path : /var/www/html/rocksensor1/web/core/modules/menu_ui/tests/src/Functional/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/modules/menu_ui/tests/src/Functional/MenuUninstallTest.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\menu_ui\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\system\Entity\Menu;
/**
* Tests that uninstalling menu does not remove custom menus.
*
* @group menu_ui
*/
class MenuUninstallTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['menu_ui'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests Menu uninstall.
*/
public function testMenuUninstall(): void {
\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.');
}
}