diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test new file mode 100644 index 00000000..35611fbb --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test | |||
@@ -0,0 +1,16 @@ | |||
1 | --TEST-- | ||
2 | "include" function accept variables and with_context | ||
3 | --TEMPLATE-- | ||
4 | {{ include("foo.twig") }} | ||
5 | {{- include("foo.twig", with_context = false) }} | ||
6 | {{- include("foo.twig", {'foo1': 'bar'}) }} | ||
7 | {{- include("foo.twig", {'foo1': 'bar'}, with_context = false) }} | ||
8 | --TEMPLATE(foo.twig)-- | ||
9 | {% for k, v in _context %}{{ k }},{% endfor %} | ||
10 | --DATA-- | ||
11 | return array('foo' => 'bar') | ||
12 | --EXPECT-- | ||
13 | foo,global,_parent, | ||
14 | global,_parent, | ||
15 | foo,global,foo1,_parent, | ||
16 | foo1,global,_parent, | ||