diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php index 94832611476..8af163ff331 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/RouterTest.php @@ -20,7 +20,7 @@ class RouterTest extends WebTestBase { * * @var array */ - public static $modules = array('block', 'menu_test'); + public static $modules = array('block', 'menu_test', 'test_page_test'); public static function getInfo() { return array( @@ -62,7 +62,7 @@ class RouterTest extends WebTestBase { * Test title callback set to FALSE. */ function testTitleCallbackFalse() { - $this->drupalGet('node'); + $this->drupalGet('test-page'); $this->assertText('A title with @placeholder', 'Raw text found on the page'); $this->assertNoText(t('A title with @placeholder', array('@placeholder' => 'some other text')), 'Text with placeholder substitutions not found.'); } @@ -160,7 +160,7 @@ class RouterTest extends WebTestBase { config('system.maintenance')->set('enabled', 1)->save(); $offline_message = t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => config('system.site')->get('name'))); - $this->drupalGet('node'); + $this->drupalGet('test-page'); $this->assertText($offline_message); $this->drupalGet('menu_login_callback'); $this->assertText('This is menu_login_callback().', 'Maintenance mode can be bypassed through hook_menu_site_status_alter().'); @@ -431,16 +431,16 @@ class RouterTest extends WebTestBase { * Test menu_set_item(). */ function testMenuSetItem() { - $item = menu_get_item('node'); + $item = menu_get_item('test-page'); - $this->assertEqual($item['path'], 'node', "Path from menu_get_item('node') is equal to 'node'", 'menu'); + $this->assertEqual($item['path'], 'test-page', "Path from menu_get_item('test-page') is equal to 'test-page'", 'menu'); // Modify the path for the item then save it. - $item['path'] = 'node_test'; - $item['href'] = 'node_test'; + $item['path'] = 'test-page-test'; + $item['href'] = 'test-page-test'; - menu_set_item('node', $item); - $compare_item = menu_get_item('node'); + menu_set_item('test-page', $item); + $compare_item = menu_get_item('test-page'); $this->assertEqual($compare_item, $item, 'Modified menu item is equal to newly retrieved menu item.', 'menu'); } @@ -466,7 +466,7 @@ class RouterTest extends WebTestBase { // Create a menu link with options. $menu_link = array( 'link_title' => 'Menu link options test', - 'link_path' => 'node', + 'link_path' => 'test-page', 'module' => 'menu_test', 'options' => array( 'attributes' => array( @@ -480,7 +480,7 @@ class RouterTest extends WebTestBase { menu_link_save($menu_link); // Load front page. - $this->drupalGet('node'); + $this->drupalGet('test-page'); $this->assertRaw('title="Test title attribute"', 'Title attribute of a menu link renders.'); $this->assertRaw('testparam=testvalue', 'Query parameter added to menu link.'); } diff --git a/core/modules/system/tests/modules/menu_test/menu_test.info b/core/modules/system/tests/modules/menu_test/menu_test.info index 4549a25c7cb..e31a3eb5a2b 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.info +++ b/core/modules/system/tests/modules/menu_test/menu_test.info @@ -4,3 +4,4 @@ package = Testing version = VERSION core = 8.x hidden = TRUE +dependencies[] = test_page_test diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index 08ef1791a88..5b5063d44ee 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -56,21 +56,21 @@ function menu_test_menu() { // Hidden link for menu_link_maintain tests $items['menu_test_maintain/%'] = array( 'title' => 'Menu maintain test', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); // Hierarchical tests. $items['menu-test/hierarchy/parent'] = array( 'title' => 'Parent menu router', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', ); $items['menu-test/hierarchy/parent/child'] = array( 'title' => 'Child menu router', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', ); $items['menu-test/hierarchy/parent/child2/child'] = array( 'title' => 'Unattached subchild router', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', ); // Theme callback tests. $items['menu-test/theme-callback/%'] = array( @@ -106,19 +106,19 @@ function menu_test_menu() { // change, we need to simulate our own in here. $items['menu-test'] = array( 'title' => 'Menu test root', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); $items['menu-test/hidden'] = array( 'title' => 'Hidden test root', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); // Hidden tests; one dynamic argument. $items['menu-test/hidden/menu'] = array( 'title' => 'Menus', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); $items['menu-test/hidden/menu/list'] = array( @@ -128,20 +128,20 @@ function menu_test_menu() { ); $items['menu-test/hidden/menu/add'] = array( 'title' => 'Add menu', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_ACTION, ); $items['menu-test/hidden/menu/settings'] = array( 'title' => 'Settings', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_TASK, 'weight' => 5, ); $items['menu-test/hidden/menu/manage/%menu'] = array( 'title' => 'Customize menu', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); $items['menu-test/hidden/menu/manage/%menu/list'] = array( @@ -152,27 +152,27 @@ function menu_test_menu() { ); $items['menu-test/hidden/menu/manage/%menu/add'] = array( 'title' => 'Add link', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_ACTION, ); $items['menu-test/hidden/menu/manage/%menu/edit'] = array( 'title' => 'Edit menu', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); $items['menu-test/hidden/menu/manage/%menu/delete'] = array( 'title' => 'Delete menu', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); // Hidden tests; two dynamic arguments. $items['menu-test/hidden/block'] = array( 'title' => 'Blocks', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); $items['menu-test/hidden/block/list'] = array( @@ -182,13 +182,13 @@ function menu_test_menu() { ); $items['menu-test/hidden/block/add'] = array( 'title' => 'Add block', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_ACTION, ); $items['menu-test/hidden/block/manage/%/%'] = array( 'title' => 'Configure block', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), ); $items['menu-test/hidden/block/manage/%/%/configure'] = array( @@ -198,7 +198,7 @@ function menu_test_menu() { ); $items['menu-test/hidden/block/manage/%/%/delete'] = array( 'title' => 'Delete block', - 'page callback' => 'node_page_default', + 'page callback' => 'test_page_test_page', 'access arguments' => array('access content'), 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_NONE,