diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module index bd44401..dfdf50a 100644 --- a/core/modules/system/tests/modules/common_test/common_test.module +++ b/core/modules/system/tests/modules/common_test/common_test.module @@ -9,12 +9,6 @@ * Implements hook_menu(). */ function common_test_menu() { - $items['common-test/destination'] = array( - 'title' => 'Drupal Get Destination', - 'page callback' => 'common_test_destination', - 'access arguments' => array('access content'), - 'type' => MENU_CALLBACK, - ); $items['common-test/query-string'] = array( 'title' => 'Test querystring', 'page callback' => 'common_test_js_and_css_querystring', @@ -31,14 +25,6 @@ function common_test_menu() { } /** - * Prints a destination query parameter. - */ -function common_test_destination() { - $destination = drupal_get_destination(); - print "The destination: " . check_plain($destination['destination']); -} - -/** * Renders an element with an invalid render array key. */ function common_test_drupal_render_invalid_keys() { diff --git a/core/modules/system/tests/modules/common_test/common_test.routing.yml b/core/modules/system/tests/modules/common_test/common_test.routing.yml index b3186c3..a542802 100644 --- a/core/modules/system/tests/modules/common_test/common_test.routing.yml +++ b/core/modules/system/tests/modules/common_test/common_test.routing.yml @@ -4,3 +4,9 @@ common_test_l_active_class: _content: '\Drupal\common_test\Controller\CommonTestController::typeLinkActiveClass' requirements: _access: 'TRUE' +common_test_destination: + pattern: 'common-test/destination' + defaults: + _controller: '\Drupal\common_test\Controller\CommonTestTextController::destination' + requirements: + _permission: 'access content' diff --git a/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestTextController.php b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestTextController.php new file mode 100644 index 0000000..a28b836 --- /dev/null +++ b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestTextController.php @@ -0,0 +1,31 @@ +