diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php index 75532b0..88283cc 100644 --- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php +++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php @@ -182,6 +182,14 @@ function deleteCustomMenu($menu) { // Test if all menu links associated to the menu were removed from database. $result = entity_load_multiple_by_properties('menu_link', array('menu_name' => $menu_name)); $this->assertFalse($result, 'All menu links associated to the custom menu were deleted.'); + + // Make sure there's no delete button on system menus. + $this->drupalGet('admin/structure/menu/manage/main/edit'); + $this->assertNoRaw('edit-delete', 'The delete button was not found'); + + // Try to delete the main menu. + $this->drupalGet('admin/structure/menu/manage/main/delete'); + $this->assertText(t('You are not authorized to access this page.')); } /**