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..4f13c91 --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig @@ -0,0 +1,12 @@ +{# +/** + * @file + * Default theme implementation for the 'theme_test_foo' theme hook. + * + * Available variables: + * - foo: Dummy text to display. + * + * @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..996fcf3 --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation for the 'theme_test' theme hook. + * + * Available variables: + * - foo: Dummy text to display. + * + * @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', @@ -31,6 +32,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'] = array( 'render element' => 'elements', @@ -112,13 +114,6 @@ function theme_test_page_alter(&$page) { } /** - * Theme function for testing theme('theme_test_foo'). - */ -function theme_theme_test_foo($variables) { - return $variables['foo']; -} - -/** * Theme function for testing theme('theme_test_function_template_override'). */ function theme_theme_test_function_template_override($variables) {