mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 06:56:51 +00:00
Add more tests
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user