public function FrontMatterTest::register in Drupal 9
Registers test-specific services.
Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.
Parameters
\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.
Overrides KernelTestBase::register
See also
\Drupal\Tests\KernelTestBase::bootKernel()
File
- core/
tests/ Drupal/ KernelTests/ Core/ Theme/ FrontMatterTest.php, line 44
Class
- FrontMatterTest
- Tests Twig front matter support.
Namespace
Drupal\KernelTests\Core\ThemeCode
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');
}