Skip to content

Commit 2d3acb2

Browse files
committed
OXDEV-9553 Add test
1 parent 0f4df4d commit 2d3acb2

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
$sMetadataVersion = '2.1';
4+
5+
$aModule = ['id' => 'module5'];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "@module1/template-with-extends.html.twig" %}
2+
3+
{% block extendable_block_module1 %}{{ parent() }}<module-5-extended-content>{% endblock %}

tests/Integration/TwigEngine/TemplateChain/ModulesTemplateChainTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ public function testRenderWith3ActiveModules(): void
163163
$this->assertStringContainsString('<module-3-extending-shop-test-theme>', $actual);
164164
}
165165

166+
public function testRenderWithModuleExtensionOnModuleView(): void
167+
{
168+
$this->setupModuleFixture('module1');
169+
$this->setupModuleFixture('module5');
170+
171+
$actual = $this->get(TemplateEngineInterface::class)->render('@module1/' . self::TEMPLATE_WITH_EXTENDS);
172+
173+
$this->assertStringContainsString('<module1-content>', $actual);
174+
$this->assertStringContainsString('<module-5-extended-content>', $actual);
175+
}
176+
166177
public function testRenderWith3ModulesAndDeactivation(): void
167178
{
168179
$this->setupModuleFixture('module1');

0 commit comments

Comments
 (0)