--TEST--
"use" tag
--TEMPLATE--
{% use 'file2.html.twig' %}
{% use 'file1.html.twig' with foo %}
{% block foo %}
{{- parent() -}}
Content of foo (second override)
{% endblock foo %}
{% block bar %}
{{- parent() -}}
Content of bar (second override)
{% endblock bar %}
--TEMPLATE(file2.html.twig)--
{% use 'file1.html.twig' %}
{% block foo %}
{{- parent() -}}
Content of foo (first override)
{% endblock foo %}
{% block bar %}
{{- parent() -}}
Content of bar (first override)
{% endblock bar %}
--TEMPLATE(file1.html.twig)--
{% block foo -%}
Content of foo
{% endblock foo %}
{% block bar -%}
Content of bar
{% endblock bar %}
--DATA--
return array()
--EXPECT--
Content of foo
Content of foo (first override)
Content of foo (second override)
Content of bar
Content of bar (second override)
|