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

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

(cherry picked from commit b0a741c5)
parent f3241f54
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ public function assertTwigTemplate($value, $message = '', $group = 'Other') {
* Tests template discovery using the Drupal theme registry.
*/
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') {
*/
public function testTemplateDiscovery() {
// 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.
$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