Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / tags / inheritance / multiple_dynamic.test
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test
new file mode 100644 (file)
index 0000000..1d3e639
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+"extends" tag
+--TEMPLATE--
+{% set foo = 1 %}
+{{ include('parent.twig') }}
+{{ include('parent.twig') }}
+{% set foo = 2 %}
+{{ include('parent.twig') }}
+--TEMPLATE(parent.twig)--
+{% extends foo~'_parent.twig' %}{% block content %}{{ parent() }} parent{% endblock %}
+--TEMPLATE(1_parent.twig)--
+{% block content %}1{% endblock %}
+--TEMPLATE(2_parent.twig)--
+{% block content %}2{% endblock %}
+--DATA--
+return array()
+--EXPECT--
+1 parent
+
+1 parent
+
+2 parent