Skip to content

Commit a4bbbbf

Browse files
authored
Update ComponentKernel.php
1 parent 859de16 commit a4bbbbf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/src/ComponentKernel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ protected function configureRoutes(RouteCollectionBuilder $routes)
3636

3737
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
3838
{
39+
// https://symfony.com/doc/current/service_container.html
3940
$c->autowire(Symfony\Component\Templating\TemplateNameParser::class)
4041
->setAutoconfigured(true)
4142
->setPublic(false);
4243

44+
$c->autowire(Twig_Loader_Array::class)
45+
->setArgument('$templates', ['index.html.twig' => 'Hello World!'])
46+
->setAutoconfigured(true)
47+
->setPublic(false);
48+
4349
//Controllers
4450
$c->autowire(SymfonyUtil\Controller\EngineAsArgumentController::class)
4551
->setAutoconfigured(true)

0 commit comments

Comments
 (0)