diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php index c62f7c3..87b9fcd 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php @@ -63,8 +63,8 @@ function testFindThemeTemplates() { $this->assertEqual($cache['node']['template_file'], 'core/modules/node/templates/node.html.twig', 'Node is using node.html.twig as template file'); $this->assertEqual($cache['node']['engine'], 'twig', 'Node is using twig engine'); - $this->assertEqual($cache['theme_test_template_test']['template_file'], 'core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php', 'theme_test is using theme_test.template_test.tpl.php as template file'); - $this->assertEqual($cache['theme_test_template_test']['engine'], 'phptemplate', 'theme_test is using phptemplate as engine.'); + $this->assertEqual($cache['theme_test_template_test']['template_file'], 'core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig', 'theme_test is using theme_test.template_test.html.twig as template file'); + $this->assertEqual($cache['theme_test_template_test']['engine'], 'twig', 'theme_test is using twig as engine.'); $templates = drupal_find_theme_templates($cache, '.html.twig', drupal_get_path('theme', 'test_theme_twig')); $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.html.twig was found in test_theme_twig.'); 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..6627891 --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme-test-foo.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for the 'theme_test' theme hook used by tests. + * + * Available variables: + * - foo: dummy text + * + * @see template_preprocess() + * @see template_preprocess_theme_test_foo() + * + * @ingroup themeable + */ +#} +{{ foo }} \ No newline at end of file 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..b388c08 --- /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_foo' theme hook used by tests. + * + * Available variables: + * - foo: dummy text + * + * @see template_preprocess() + * @see template_preprocess_theme_test() + * + * @ingroup themeable + */ +#} +Theme hook implementor=theme_theme_test(). Foo={{ foo }} \ No newline at end of file diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig new file mode 100644 index 0000000..cde8faa --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig @@ -0,0 +1,2 @@ + +Fail: Template not overridden. diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php deleted file mode 100644 index cde8faa..0000000 --- a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php +++ /dev/null @@ -1,2 +0,0 @@ - -Fail: Template not overridden. 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..038f462 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 @@