Add more tests

This commit is contained in:
Fabien Potencier
2024-09-09 08:41:21 +02:00
parent bf6b7ae53d
commit 45e167a514
@@ -0,0 +1,38 @@
--TEST--
conditional "block" tag with "extends" tag (nested)
--TEMPLATE--
{% extends "layout.twig" %}
{% block content_base %}
{{ parent() -}}
index
{% endblock %}
{% block content_layout -%}
{{ parent() -}}
nested_index
{% endblock %}
--TEMPLATE(layout.twig)--
{% extends "base.twig" %}
{% block content_base %}
{{ parent() -}}
layout
{% if true -%}
{% block content_layout -%}
nested_layout
{% endblock -%}
{% endif %}
{% endblock %}
--TEMPLATE(base.twig)--
{% block content_base %}
base
{% endblock %}
--DATA--
return []
--EXPECT--
base
layout
nested_layout
nested_index
index