function TwigRegistryLoaderTest::testTemplateDiscovery

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php \Drupal\Tests\system\Functional\Theme\TwigRegistryLoaderTest::testTemplateDiscovery()
  2. 8.9.x core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php \Drupal\Tests\system\Functional\Theme\TwigRegistryLoaderTest::testTemplateDiscovery()
  3. 10 core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php \Drupal\Tests\system\Functional\Theme\TwigRegistryLoaderTest::testTemplateDiscovery()

Tests template discovery using the Drupal theme registry.

File

core/modules/system/tests/src/Functional/Theme/TwigRegistryLoaderTest.php, line 53

Class

TwigRegistryLoaderTest
Tests Twig registry loader.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testTemplateDiscovery() : void {
    $this->assertTwigTemplate($this->twig
        ->load('block.html.twig'), 'Found block.html.twig in block module.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.