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 0c6cdb6..06d994d 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', @@ -25,14 +19,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']); -} - -/** * Applies #printed to an element to help test #pre_render. */ function common_test_drupal_render_printing_pre_render($elements) { 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 fb27e33..be7255e 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,6 +4,12 @@ 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' common_test_drupal_render_invalid_keys: pattern: 'common-test/drupal-render-invalid-keys' defaults: 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..3b7e103 --- /dev/null +++ b/core/modules/system/tests/modules/common_test/lib/Drupal/common_test/Controller/CommonTestTextController.php @@ -0,0 +1,31 @@ +