diff --git a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php index c790a84..06f3fce 100644 --- a/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php +++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php @@ -31,4 +31,10 @@ function functionTemplateOverridden() { ); } + /** + * Calls a theme hook suggestion. + */ + function themeTestSuggestion() { + return theme(array('theme_test__suggestion', 'theme_test'), array()); + } } diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index 40a78f3..f44e345 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -47,8 +47,7 @@ function theme_test_system_theme_info() { function theme_test_menu() { $items['theme-test/suggestion'] = array( 'title' => 'Suggestion', - 'page callback' => '_theme_test_suggestion', - 'access callback' => TRUE, + 'route_name' => 'theme_test_suggestion', 'theme callback' => '_theme_custom_theme', 'type' => MENU_CALLBACK, ); @@ -143,13 +142,6 @@ function _theme_test_alter() { } /** - * Page callback, calls a theme hook suggestion. - */ -function _theme_test_suggestion() { - return theme(array('theme_test__suggestion', 'theme_test'), array()); -} - -/** * Implements hook_preprocess_HOOK() for html.tpl.php. */ function theme_test_preprocess_html(&$variables) { diff --git a/core/modules/system/tests/modules/theme_test/theme_test.routing.yml b/core/modules/system/tests/modules/theme_test/theme_test.routing.yml index 866171e..9f36108 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.routing.yml +++ b/core/modules/system/tests/modules/theme_test/theme_test.routing.yml @@ -4,3 +4,10 @@ function_template_override: _content: '\Drupal\theme_test\ThemeTestController::functionTemplateOverridden' requirements: _permission: 'access content' + +theme_test_suggestion: + pattern: 'theme-test/suggestion' + defaults: + _content: '\Drupal\theme_test\ThemeTestController::themeTestSuggestion' + requirements: + _access: 'TRUE'