use KernelTestBehaviour;
public function testMultipleInheritance(): void
{ $twig =
$this->
initTwig([ new BundleFixture('Storefront', __DIR__ . '/fixtures/Storefront/'
),
new BundleFixture('TestPlugin1', __DIR__ . '/fixtures/Plugins/TestPlugin1'
),
new BundleFixture('TestPlugin2', __DIR__ . '/fixtures/Plugins/TestPlugin2'
),
]);
$template =
$twig->
loadTemplate($twig->
getTemplateClass('storefront/frontend/index.html.twig'
), 'storefront/frontend/index.html.twig'
);
static::
assertSame('innerblockplugin2innerblockplugin1innerblock',
$template->
render([]));
} public function testInterpolatedInheritance(): void
{ // order storefront, TestPlugin2, TestPlugin1 is important for this test. Do not change.
$twig =
$this->
initTwig([ new BundleFixture('Storefront', __DIR__ . '/fixtures/Storefront/'
),
new BundleFixture('TestPlugin2', __DIR__ . '/fixtures/Plugins/TestPlugin2'
),
new BundleFixture('TestPlugin1', __DIR__ . '/fixtures/Plugins/TestPlugin1'
),
]);