diff --git a/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig new file mode 100644 index 0000000..c4e8f72 --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation for the 'theme_test_foo' theme hook. + * + * Available variables: + * - foo: Dummy text to display. + * + * @see template_preprocess() + * + * @ingroup themeable + */ +#} +{{ foo }} diff --git a/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig new file mode 100644 index 0000000..c5c9b8d --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for the 'theme_test' theme hook. + * + * Available variables: + * - foo: Dummy text to display. + * + * @see template_preprocess() + * @see template_preprocess_theme_test() + * + * @ingroup themeable + */ +#} +Theme hook implementor=theme_theme_test(). Foo={{ foo }} diff --git a/core/modules/system/tests/modules/theme_test/theme_test.inc b/core/modules/system/tests/modules/theme_test/theme_test.inc index 6cde683..99043fe 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.inc +++ b/core/modules/system/tests/modules/theme_test/theme_test.inc @@ -1,14 +1,13 @@ 'theme_test.inc', 'variables' => array('foo' => ''), + 'template' => 'theme-test', ); $items['theme_test_template_test'] = array( 'template' => 'theme_test.template_test', @@ -16,6 +17,7 @@ function theme_test_theme($existing, $type, $theme, $path) { ); $items['theme_test_foo'] = array( 'variables' => array('foo' => NULL), + 'template' => 'theme-test-foo', ); $items['theme_test_render_element_children'] = array( 'render element' => 'element', @@ -169,13 +171,6 @@ function theme_test_preprocess_html(&$variables) { } /** - * Theme function for testing theme('theme_test_foo'). - */ -function theme_theme_test_foo($variables) { - return $variables['foo']; -} - -/** * Theme function for testing rendering of child elements via drupal_render(). * * Theme hooks defining a 'render element' add an internal '#render_children'