You are here

public function FrontMatterTest::register in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php \Drupal\KernelTests\Core\Theme\FrontMatterTest::register()

File

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

Class

FrontMatterTest
Tests Twig front matter support.

Namespace

Drupal\KernelTests\Core\Theme

Code

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