Commit e562ca4d authored by alexpott's avatar alexpott

Issue #2085243 by dawehner: Rename Menu module into Menu UI module.

parent 62ba47d2
...@@ -422,8 +422,8 @@ function menu_secondary_menu() { ...@@ -422,8 +422,8 @@ function menu_secondary_menu() {
* Returns menu name, if exist * Returns menu name, if exist
*/ */
function _menu_get_links_source($name, $default) { function _menu_get_links_source($name, $default) {
$config = \Drupal::config('menu.settings'); $config = \Drupal::config('menu_ui.settings');
return \Drupal::moduleHandler()->moduleExists('menu') ? $config->get($name) : $default; return \Drupal::moduleHandler()->moduleExists('menu_ui') ? $config->get($name) : $default;
} }
/** /**
......
...@@ -21,7 +21,7 @@ class BlockLanguageCacheTest extends WebTestBase { ...@@ -21,7 +21,7 @@ class BlockLanguageCacheTest extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('block', 'language', 'menu'); public static $modules = array('block', 'language', 'menu_ui');
/** /**
* List of langcodes. * List of langcodes.
......
...@@ -30,7 +30,7 @@ class ConfigTranslationListUiTest extends WebTestBase { ...@@ -30,7 +30,7 @@ class ConfigTranslationListUiTest extends WebTestBase {
'custom_block', 'custom_block',
'field', 'field',
'field_ui', 'field_ui',
'menu', 'menu_ui',
'node', 'node',
'shortcut', 'shortcut',
'taxonomy', 'taxonomy',
......
...@@ -20,7 +20,7 @@ class ForumTest extends WebTestBase { ...@@ -20,7 +20,7 @@ class ForumTest extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('taxonomy', 'comment', 'forum', 'node', 'block', 'menu', 'help'); public static $modules = array('taxonomy', 'comment', 'forum', 'node', 'block', 'menu_ui', 'help');
/** /**
* A user with various administrative privileges. * A user with various administrative privileges.
......
menu.menu_edit:
title: 'Edit menu'
route_name: menu.menu_edit
base_route: menu.menu_edit
menu.overview_page:
title: 'List'
route_name: menu.overview_page
base_route: menu.overview_page
menu.settings:
title: 'Settings'
route_name: menu.settings
base_route: menu.overview_page
weight: 100
...@@ -111,7 +111,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface { ...@@ -111,7 +111,7 @@ class MenuLink extends Entity implements \ArrayAccess, MenuLinkInterface {
* *
* @var string * @var string
*/ */
public $module = 'menu'; public $module = 'menu_ui';
/** /**
* A flag for whether the link should be rendered in menus. * A flag for whether the link should be rendered in menus.
......
...@@ -31,7 +31,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A ...@@ -31,7 +31,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
case 'delete': case 'delete':
// Only items created by the menu module can be deleted. // Only items created by the menu module can be deleted.
return $entity->module == 'menu' || $entity->updated == 1; return $entity->module == 'menu_ui' || $entity->updated == 1;
} }
} }
......
...@@ -98,7 +98,7 @@ public function form(array $form, array &$form_state) { ...@@ -98,7 +98,7 @@ public function form(array $form, array &$form_state) {
if (isset($menu_link->options['fragment'])) { if (isset($menu_link->options['fragment'])) {
$path .= '#' . $menu_link->options['fragment']; $path .= '#' . $menu_link->options['fragment'];
} }
if ($menu_link->module == 'menu') { if ($menu_link->module == 'menu_ui') {
$form['link_path'] = array( $form['link_path'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Path'), '#title' => t('Path'),
...@@ -137,7 +137,7 @@ public function form(array $form, array &$form_state) { ...@@ -137,7 +137,7 @@ public function form(array $form, array &$form_state) {
); );
// Generate a list of possible parents (not including this link or descendants). // Generate a list of possible parents (not including this link or descendants).
$options = menu_parent_options(menu_get_menus(), $menu_link); $options = menu_ui_parent_options(menu_ui_get_menus(), $menu_link);
$default = $menu_link->menu_name . ':' . $menu_link->plid; $default = $menu_link->menu_name . ':' . $menu_link->plid;
if (!isset($options[$default])) { if (!isset($options[$default])) {
$default = 'tools:0'; $default = 'tools:0';
...@@ -298,7 +298,7 @@ public function save(array $form, array &$form_state) { ...@@ -298,7 +298,7 @@ public function save(array $form, array &$form_state) {
if ($saved) { if ($saved) {
drupal_set_message(t('The menu link has been saved.')); drupal_set_message(t('The menu link has been saved.'));
$form_state['redirect_route'] = array( $form_state['redirect_route'] = array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $menu_link->menu_name, 'menu' => $menu_link->menu_name,
), ),
......
...@@ -15,7 +15,7 @@ function menu_link_help($path, $arg) { ...@@ -15,7 +15,7 @@ function menu_link_help($path, $arg) {
case 'admin/help#menu_link': case 'admin/help#menu_link':
$output = ''; $output = '';
$output .= '<h3>' . t('About') . '</h3>'; $output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Menu Link module allows users to create menu links. It is required by the Menu module, which provides an interface for managing menus. See the <a href="!menu-help">Menu module help page</a> for more information.', array('!menu-help' => \Drupal::url('help.page', array('name' => 'menu')))) . '</p>'; $output .= '<p>' . t('The Menu Link module allows users to create menu links. It is required by the Menu module, which provides an interface for managing menus. See the <a href="!menu-help">Menu module help page</a> for more information.', array('!menu-help' => \Drupal::url('help.page', array('name' => 'menu_ui')))) . '</p>';
return $output; return $output;
} }
} }
...@@ -203,12 +203,12 @@ function menu_link_maintain($module, $op, $link_path, $link_title = NULL) { ...@@ -203,12 +203,12 @@ function menu_link_maintain($module, $op, $link_path, $link_title = NULL) {
function menu_link_system_breadcrumb_alter(array &$breadcrumb, array $attributes, array $context) { function menu_link_system_breadcrumb_alter(array &$breadcrumb, array $attributes, array $context) {
// Custom breadcrumb behavior for editing menu links, we append a link to // Custom breadcrumb behavior for editing menu links, we append a link to
// the menu in which the link is found. // the menu in which the link is found.
if (!empty($attributes[RouteObjectInterface::ROUTE_NAME]) && $attributes[RouteObjectInterface::ROUTE_NAME] == 'menu.link_edit' && !empty($attributes['menu_link'])) { if (!empty($attributes[RouteObjectInterface::ROUTE_NAME]) && $attributes[RouteObjectInterface::ROUTE_NAME] == 'menu_ui.link_edit' && !empty($attributes['menu_link'])) {
$menu_link = $attributes['menu_link']; $menu_link = $attributes['menu_link'];
if (($menu_link instanceof MenuLinkInterface) && !$menu_link->isNew()) { if (($menu_link instanceof MenuLinkInterface) && !$menu_link->isNew()) {
// Add a link to the menu admin screen. // Add a link to the menu admin screen.
$menu = entity_load('menu', $menu_link->menu_name); $menu = entity_load('menu', $menu_link->menu_name);
$breadcrumb[] = Drupal::l($menu->label(), 'menu.menu_edit', array('menu' => $menu->id)); $breadcrumb[] = Drupal::l($menu->label(), 'menu_ui.menu_edit', array('menu' => $menu->id));
} }
} }
} }
# Schema for configuration files of the Menu module. # Schema for configuration files of the Menu module.
menu.settings: menu_ui.settings:
type: mapping type: mapping
label: 'Menu settings' label: 'Menu settings'
mapping: mapping:
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\Controller\MenuController. * Contains \Drupal\menu_ui\Controller\MenuController.
*/ */
namespace Drupal\menu\Controller; namespace Drupal\menu_ui\Controller;
use Drupal\Component\Utility\Xss; use Drupal\Component\Utility\Xss;
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
...@@ -34,7 +34,7 @@ public function getParentOptions(Request $request) { ...@@ -34,7 +34,7 @@ public function getParentOptions(Request $request) {
$available_menus[$menu] = $menu; $available_menus[$menu] = $menu;
} }
} }
$options = _menu_get_options(menu_get_menus(), $available_menus, array('mlid' => 0)); $options = _menu_ui_get_options(menu_ui_get_menus(), $available_menus, array('mlid' => 0));
return new JsonResponse($options); return new JsonResponse($options);
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\Form\MenuDeleteForm. * Contains \Drupal\menu_ui\Form\MenuDeleteForm.
*/ */
namespace Drupal\menu\Form; namespace Drupal\menu_ui\Form;
use Drupal\Core\Database\Connection; use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Entity\EntityConfirmFormBase;
...@@ -66,7 +66,7 @@ public function getQuestion() { ...@@ -66,7 +66,7 @@ public function getQuestion() {
*/ */
public function getCancelRoute() { public function getCancelRoute() {
return array( return array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $this->entity->id(), 'menu' => $this->entity->id(),
), ),
...@@ -97,7 +97,7 @@ public function getConfirmText() { ...@@ -97,7 +97,7 @@ public function getConfirmText() {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function submit(array $form, array &$form_state) { public function submit(array $form, array &$form_state) {
$form_state['redirect_route']['route_name'] = 'menu.overview_page'; $form_state['redirect_route']['route_name'] = 'menu_ui.overview_page';
// Locked menus may not be deleted. // Locked menus may not be deleted.
if ($this->entity->isLocked()) { if ($this->entity->isLocked()) {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\Form\MenuLinkDeleteForm. * Contains \Drupal\menu_ui\Form\MenuLinkDeleteForm.
*/ */
namespace Drupal\menu\Form; namespace Drupal\menu_ui\Form;
use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Entity\EntityConfirmFormBase;
...@@ -26,7 +26,7 @@ public function getQuestion() { ...@@ -26,7 +26,7 @@ public function getQuestion() {
*/ */
public function getCancelRoute() { public function getCancelRoute() {
return array( return array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $this->entity->menu_name, 'menu' => $this->entity->menu_name,
), ),
...@@ -42,7 +42,7 @@ public function submit(array $form, array &$form_state) { ...@@ -42,7 +42,7 @@ public function submit(array $form, array &$form_state) {
drupal_set_message(t('The menu link %title has been deleted.', $t_args)); drupal_set_message(t('The menu link %title has been deleted.', $t_args));
watchdog('menu', 'Deleted menu link %title.', $t_args, WATCHDOG_NOTICE); watchdog('menu', 'Deleted menu link %title.', $t_args, WATCHDOG_NOTICE);
$form_state['redirect_route'] = array( $form_state['redirect_route'] = array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $this->entity->menu_name, 'menu' => $this->entity->menu_name,
), ),
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\Form\MenuLinkResetForm. * Contains \Drupal\menu_ui\Form\MenuLinkResetForm.
*/ */
namespace Drupal\menu\Form; namespace Drupal\menu_ui\Form;
use Drupal\Core\Entity\EntityConfirmFormBase; use Drupal\Core\Entity\EntityConfirmFormBase;
...@@ -26,7 +26,7 @@ public function getQuestion() { ...@@ -26,7 +26,7 @@ public function getQuestion() {
*/ */
public function getCancelRoute() { public function getCancelRoute() {
return array( return array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $this->entity->menu_name, 'menu' => $this->entity->menu_name,
), ),
...@@ -54,7 +54,7 @@ public function submit(array $form, array &$form_state) { ...@@ -54,7 +54,7 @@ public function submit(array $form, array &$form_state) {
$new_menu_link = $this->entity->reset(); $new_menu_link = $this->entity->reset();
drupal_set_message(t('The menu link was reset to its default settings.')); drupal_set_message(t('The menu link was reset to its default settings.'));
$form_state['redirect_route'] = array( $form_state['redirect_route'] = array(
'route_name' => 'menu.menu_edit', 'route_name' => 'menu_ui.menu_edit',
'route_parameters' => array( 'route_parameters' => array(
'menu' => $new_menu_link->menu_name, 'menu' => $new_menu_link->menu_name,
), ),
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\MenuFormController. * Contains \Drupal\menu_ui\MenuFormController.
*/ */
namespace Drupal\menu; namespace Drupal\menu_ui;
use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\EntityFormController; use Drupal\Core\Entity\EntityFormController;
...@@ -240,7 +240,7 @@ public function save(array $form, array &$form_state) { ...@@ -240,7 +240,7 @@ public function save(array $form, array &$form_state) {
* *
* This form constructor can be integrated as a section into another form. It * This form constructor can be integrated as a section into another form. It
* relies on the following keys in $form_state: * relies on the following keys in $form_state:
* - menu: A loaded menu definition, as returned by menu_load(). * - menu: A loaded menu definition, as returned by menu_ui_load().
* - menu_overview_form_parents: An array containing the parent keys to this * - menu_overview_form_parents: An array containing the parent keys to this
* form. * form.
* Forms integrating this section should call menu_overview_form_submit() from * Forms integrating this section should call menu_overview_form_submit() from
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\MenuListBuilder. * Contains \Drupal\menu_ui\MenuListBuilder.
*/ */
namespace Drupal\menu; namespace Drupal\menu_ui;
use Drupal\Component\Utility\Xss; use Drupal\Component\Utility\Xss;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder; use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\MenuSettingsForm. * Contains \Drupal\menu_ui\MenuSettingsForm.
*/ */
namespace Drupal\menu; namespace Drupal\menu_ui;
use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\ConfigFormBase;
...@@ -25,13 +25,13 @@ public function getFormId() { ...@@ -25,13 +25,13 @@ public function getFormId() {
* Implements \Drupal\Core\Form\FormInterface::buildForm(). * Implements \Drupal\Core\Form\FormInterface::buildForm().
*/ */
public function buildForm(array $form, array &$form_state) { public function buildForm(array $form, array &$form_state) {
$config = $this->configFactory->get('menu.settings'); $config = $this->configFactory->get('menu_ui.settings');
$form['intro'] = array( $form['intro'] = array(
'#type' => 'item', '#type' => 'item',
'#markup' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. To configure these settings for a particular content type, visit the <a href="@content-types">Content types</a> page, click the <em>edit</em> link for the content type, and go to the <em>Menu settings</em> section.', array('@content-types' => url('admin/structure/types'))), '#markup' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. To configure these settings for a particular content type, visit the <a href="@content-types">Content types</a> page, click the <em>edit</em> link for the content type, and go to the <em>Menu settings</em> section.', array('@content-types' => url('admin/structure/types'))),
); );
$menu_options = menu_get_menus(); $menu_options = menu_ui_get_menus();
$main = $config->get('main_links'); $main = $config->get('main_links');
$form['menu_main_links_source'] = array( $form['menu_main_links_source'] = array(
...@@ -61,7 +61,7 @@ public function buildForm(array $form, array &$form_state) { ...@@ -61,7 +61,7 @@ public function buildForm(array $form, array &$form_state) {
* Implements \Drupal\Core\Form\FormInterface::submitForm(). * Implements \Drupal\Core\Form\FormInterface::submitForm().
*/ */
public function submitForm(array &$form, array &$form_state) { public function submitForm(array &$form, array &$form_state) {
$this->configFactory->get('menu.settings') $this->configFactory->get('menu_ui.settings')
->set('main_links', $form_state['values']['menu_main_links_source']) ->set('main_links', $form_state['values']['menu_main_links_source'])
->set('secondary_links', $form_state['values']['menu_secondary_links_source']) ->set('secondary_links', $form_state['values']['menu_secondary_links_source'])
->save(); ->save();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Contains \Drupal\menu\Tests\MenuCacheTagsTest. * Contains \Drupal\menu\Tests\MenuCacheTagsTest.
*/ */
namespace Drupal\menu\Tests; namespace Drupal\menu_ui\Tests;
use Drupal\system\Tests\Cache\PageCacheTagsTestBase; use Drupal\system\Tests\Cache\PageCacheTagsTestBase;
...@@ -17,7 +17,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase { ...@@ -17,7 +17,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = array('menu', 'block', 'test_page_test'); public static $modules = array('menu_ui', 'block', 'test_page_test');
/** /**
* {@inheritdoc} * {@inheritdoc}
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Tests for menu language settings. * Tests for menu_ui language settings.
*/ */
namespace Drupal\menu\Tests; namespace Drupal\menu_ui\Tests;
use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\Unicode;
use Drupal\Core\Language\Language; use Drupal\Core\Language\Language;
...@@ -174,7 +174,7 @@ function testMenuLanguageRemovedEnglish() { ...@@ -174,7 +174,7 @@ function testMenuLanguageRemovedEnglish() {
$this->drupalPostForm('admin/structure/menu/add', $edit, t('Save')); $this->drupalPostForm('admin/structure/menu/add', $edit, t('Save'));
// Check that the language settings were saved. // Check that the language settings were saved.
$menu = menu_load($menu_name); $menu = menu_ui_load($menu_name);
$this->assertEqual($menu->langcode, 'en'); $this->assertEqual($menu->langcode, 'en');
// Remove English language. To do that another language has to be set as // Remove English language. To do that another language has to be set as
...@@ -186,7 +186,7 @@ function testMenuLanguageRemovedEnglish() { ...@@ -186,7 +186,7 @@ function testMenuLanguageRemovedEnglish() {
// Save the menu again and check if the language is still the same. // Save the menu again and check if the language is still the same.
$this->drupalPostForm("admin/structure/menu/manage/$menu_name", array(), t('Save')); $this->drupalPostForm("admin/structure/menu/manage/$menu_name", array(), t('Save'));
$menu = menu_load($menu_name); $menu = menu_ui_load($menu_name);
$this->assertEqual($menu->langcode, 'en'); $this->assertEqual($menu->langcode, 'en');
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Definition of Drupal\menu\Tests\MenuNodeTest. * Definition of Drupal\menu_ui\Tests\MenuNodeTest.
*/ */
namespace Drupal\menu\Tests; namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase; use Drupal\simpletest\WebTestBase;
...@@ -19,7 +19,7 @@ class MenuNodeTest extends WebTestBase { ...@@ -19,7 +19,7 @@ class MenuNodeTest extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('menu', 'test_page_test', 'node'); public static $modules = array('menu_ui', 'test_page_test', 'node');
public static function getInfo() { public static function getInfo() {
return array( return array(
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Definition of Drupal\menu\Tests\MenuTest. * Definition of Drupal\menu_ui\Tests\MenuTest.
*/ */
namespace Drupal\menu\Tests; namespace Drupal\menu_ui\Tests;
use Drupal\Component\Utility\Json; use Drupal\Component\Utility\Json;
...@@ -199,7 +199,7 @@ function addCustomMenu() { ...@@ -199,7 +199,7 @@ function addCustomMenu() {
// Enable the block. // Enable the block.
$this->drupalPlaceBlock('system_menu_block:' . $menu_name); $this->drupalPlaceBlock('system_menu_block:' . $menu_name);
return menu_load($menu_name); return menu_ui_load($menu_name);
} }
/** /**
...@@ -216,7 +216,7 @@ function deleteCustomMenu() { ...@@ -216,7 +216,7 @@ function deleteCustomMenu() {
$this->drupalPostForm("admin/structure/menu/manage/$menu_name/delete", array(), t('Delete')); $this->drupalPostForm("admin/structure/menu/manage/$menu_name/delete", array(), t('Delete'));
$this->assertResponse(200); $this->assertResponse(200);
$this->assertRaw(t('The custom menu %title has been deleted.', array('%title' => $label)), 'Custom menu was deleted'); $this->assertRaw(t('The custom menu %title has been deleted.', array('%title' => $label)), 'Custom menu was deleted');
$this->assertFalse(menu_load($menu_name), 'Custom menu was deleted'); $this->assertFalse(menu_ui_load($menu_name), 'Custom menu was deleted');
// Test if all menu links associated to the menu were removed from database. // 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)); $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.'); $this->assertFalse($result, 'All menu links associated to the custom menu were deleted.');
...@@ -477,7 +477,7 @@ public function testBlockContextualLinks() { ...@@ -477,7 +477,7 @@ public function testBlockContextualLinks() {
$response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page'))); $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page')));
$this->assertResponse(200); $this->assertResponse(200);
$json = Json::decode($response); $json = Json::decode($response);
$this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="menu-edit"><a href="' . base_path() . 'admin/structure/menu/manage/tools">Edit menu</a></li></ul>'); $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="menu-ui-edit"><a href="' . base_path() . 'admin/structure/menu/manage/tools">Edit menu</a></li></ul>');
} }
/** /**
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\menu\Tests\MenuUninstallTest. * Contains \Drupal\menu_ui\Tests\MenuUninstallTest.
*/ */
namespace Drupal\menu\Tests; namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase; use Drupal\simpletest\WebTestBase;
...@@ -19,7 +19,7 @@ class MenuUninstallTest extends WebTestBase { ...@@ -19,7 +19,7 @@ class MenuUninstallTest extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('menu'); public static $modules = array('menu_ui');
public static function getInfo() { public static function getInfo() {
return array( return array(
...@@ -33,7 +33,7 @@ public static function getInfo() { ...@@ -33,7 +33,7 @@ public static function getInfo() {
* Tests Menu uninstall. * Tests Menu uninstall.
*/ */
public function testMenuUninstall() { public function testMenuUninstall() {
\Drupal::moduleHandler()->uninstall(array('menu')); \Drupal::moduleHandler()->uninstall(array('menu_ui'));
$this->assertTrue(entity_load('menu', 'admin', TRUE), 'The \'admin\' menu still exists after uninstalling menu module.'); $this->assertTrue(entity_load('menu', 'admin', TRUE), 'The \'admin\' menu still exists after uninstalling menu module.');
} }
......