Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / functions / block_with_template.test
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test
new file mode 100644 (file)
index 0000000..8305eb6
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+"block" function with a template argument
+--TEMPLATE--
+{{ block('foo', 'included.twig') }}
+{{ block('foo', included_loaded) }}
+{{ block('foo', included_loaded_internal) }}
+{% set output = block('foo', 'included.twig') %}
+{{ output }}
+{% block foo %}NOT FOO{% endblock %}
+--TEMPLATE(included.twig)--
+{% block foo %}FOO{% endblock %}
+--DATA--
+return array(
+    'included_loaded' => $twig->load('included.twig'),
+    'included_loaded_internal' => $twig->loadTemplate('included.twig'),
+)
+--EXPECT--
+FOO
+FOO
+FOO
+FOO
+NOT FOO