Skip to content
Snippets Groups Projects
Commit b0a741c5 authored by catch's avatar catch
Browse files

Issue #3042848 by mikelutz: use ->load() instead of ->resolveTemplate in Twig Resolver tests

parent 2f840765
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -41,7 +41,7 @@ public function assertTwigTemplate($value, $message = '', $group = 'Other') { ...@@ -41,7 +41,7 @@ public function assertTwigTemplate($value, $message = '', $group = 'Other') {
* Tests template discovery using the Drupal theme registry. * Tests template discovery using the Drupal theme registry.
*/ */
public function testTemplateDiscovery() { public function testTemplateDiscovery() {
$this->assertTwigTemplate($this->twig->resolveTemplate('block.html.twig'), 'Found block.html.twig in block module.'); $this->assertTwigTemplate($this->twig->load('block.html.twig'), 'Found block.html.twig in block module.');
} }
/** /**
......
...@@ -42,10 +42,10 @@ public function assertTwigTemplate($value, $message = '', $group = 'Other') { ...@@ -42,10 +42,10 @@ public function assertTwigTemplate($value, $message = '', $group = 'Other') {
*/ */
public function testTemplateDiscovery() { public function testTemplateDiscovery() {
// Tests resolving namespaced templates in modules. // Tests resolving namespaced templates in modules.
$this->assertTwigTemplate($this->twig->resolveTemplate('@node/node.html.twig'), 'Found node.html.twig in node module.'); $this->assertTwigTemplate($this->twig->load('@node/node.html.twig'), 'Found node.html.twig in node module.');
// Tests resolving namespaced templates in themes. // Tests resolving namespaced templates in themes.
$this->assertTwigTemplate($this->twig->resolveTemplate('@bartik/page.html.twig'), 'Found page.html.twig in Bartik theme.'); $this->assertTwigTemplate($this->twig->load('@bartik/page.html.twig'), 'Found page.html.twig in Bartik theme.');
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment