$template =
$twig->
loadTemplate($twig->
getTemplateClass('storefront/frontend/dynamic_include.html.twig'
), 'storefront/frontend/dynamic_include.html.twig'
);
static::
assertSame('a/TestPlugin1_a/TestPlugin2_a',
$template->
render(['child' => 'a'
]));
static::
assertSame('b/TestPlugin1_b/TestPlugin2_b',
$template->
render(['child' => 'b'
]));
} /**
* @param BundleFixture[] $bundles
*/
private function initTwig(array
$bundles): Environment
{ $loader =
new FilesystemLoader(__DIR__ . '/fixtures/Storefront/Resources/views'
);
foreach ($bundles as $bundle) { $directory =
$bundle->
getPath() . '/Resources/views';
$loader->
addPath($directory);
$loader->
addPath($directory,
$bundle->
getName());
} $twig =
new TwigEnvironment($loader,
['cache' => false
]);
$kernel =
$this->
createMock(Kernel::
class);
$kernel->
expects(static::
any())