diff --git c/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php w/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php index 6dfcc4b..f94e6c5 100644 --- c/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php +++ w/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/ThemeTestController.php @@ -15,7 +15,10 @@ class ThemeTestController extends ControllerBase { /** - * Menu callback for testing that a theme template overrides a theme function. + * A theme template that overrides a theme function. + * + * @return array + * Render array containing a theme. */ public function functionTemplateOverridden() { return array( @@ -26,10 +29,8 @@ public function functionTemplateOverridden() { /** * Adds stylesheets to test theme .info.yml property processing. * - * @see test_basetheme.info.yml - * @see test_subtheme.info.yml - * @see \Drupal\system\Tests\Theme\ThemeInfoStylesTest - * @see http://drupal.org/node/967266#comment-3689670 + * @return array + * A render array containing custom stylesheets. */ public function testInfoStylesheets() { $path = drupal_get_path('module', 'theme_test'); @@ -49,8 +50,11 @@ public function testInfoStylesheets() { /** * Tests template overridding based on filename. + * + * @return array + * A render array containing a theme override. */ - function testTemplate() { + public function testTemplate() { return array( '#theme' => 'theme_test_template_test', ); @@ -58,6 +62,9 @@ function testTemplate() { /** * Calls a theme hook suggestion. + * + * @return string + * An HTML string containing the themed output. */ public function testSuggestion() { return theme(array('theme_test__suggestion', 'theme_test'), array()); @@ -67,6 +74,9 @@ public function testSuggestion() { * This is for testing that the theme can have hook_*_alter() implementations * that run during page callback execution, even before theme() is called for * the first time. + * + * @return string + * A string containing the altered data. */ public function testAlter() { $data = 'foo'; diff --git c/core/modules/system/tests/modules/theme_test/theme_test.module w/core/modules/system/tests/modules/theme_test/theme_test.module index 4e3361e..8f3445d 100644 --- c/core/modules/system/tests/modules/theme_test/theme_test.module +++ w/core/modules/system/tests/modules/theme_test/theme_test.module @@ -52,6 +52,7 @@ function theme_test_menu() { ); $items['theme-test/alter'] = array( 'theme callback' => '_theme_custom_theme', + 'route_name' => 'theme_test_alter', 'type' => MENU_CALLBACK, ); $items['theme-test/request-listener'] = array( diff --git c/core/modules/system/tests/modules/theme_test/theme_test.routing.yml w/core/modules/system/tests/modules/theme_test/theme_test.routing.yml index 0d35863..9ff8172 100644 --- c/core/modules/system/tests/modules/theme_test/theme_test.routing.yml +++ w/core/modules/system/tests/modules/theme_test/theme_test.routing.yml @@ -20,7 +20,7 @@ theme_test_template_test: _access: 'TRUE' theme_test_suggestion: - pattern: 'theme-test/suggestion' + pattern: '/theme-test/suggestion' defaults: _content: '\Drupal\theme_test\ThemeTestController::testSuggestion' _title: 'Suggestion' @@ -28,7 +28,7 @@ theme_test_suggestion: _access: 'TRUE' theme_test_alter: - pattern: 'theme-test/alter' + pattern: '/theme-test/alter' defaults: _content: '\Drupal\theme_test\ThemeTestController::testAlter' _title: 'Suggestion'