function FrontMatterTest::register

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php \Drupal\KernelTests\Core\Theme\FrontMatterTest::register()
  2. 11.x core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php \Drupal\KernelTests\Core\Theme\FrontMatterTest::register()

Overrides KernelTestBase::register

File

core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php, line 44

Class

FrontMatterTest
Tests Twig front matter support.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function register(ContainerBuilder $container) {
    parent::register($container);
    $definition = new Definition('Twig_Loader_Filesystem', [
        [
            sys_get_temp_dir(),
        ],
    ]);
    $definition->setPublic(TRUE);
    $container->setDefinition('twig_loader__file_system', $definition)
        ->addTag('twig.loader');
}

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