Skip to content

Commit 3fd96bf

Browse files
committed
[Twig] Adding failing test case for HTML component with another HTML component in content block
1 parent ab2cfd0 commit 3fd96bf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/TwigComponent/tests/Unit/TwigPreLexerTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,17 @@ public function getLexTests(): iterable
104104
'<twig:foo text="Hello {{ name }}, I\'m Theo!"/>',
105105
"{{ component('foo', { text: 'Hello '~(name)~', I\'m Theo!' }) }}",
106106
];
107+
yield 'component_where_entire_default_block_is_embedded_component' => [
108+
<<<EOF
109+
<twig:foo>
110+
<twig:bar>bar content</twig:bar>
111+
</twig:foo>
112+
EOF,
113+
<<<EOF
114+
{% component 'foo' %}
115+
{% block content %}{% component 'bar' %}{% block content %}bar content{% endblock %}{% endcomponent %}
116+
{% endblock %}{% endcomponent %}
117+
EOF
118+
];
107119
}
108120
}

0 commit comments

Comments
 (0)