PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/functions/include/with_context.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/functions/include/with_context.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/functions/include/with_context.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 461 bytes
 

Contents

Class file image Download
--TEST-- "include" function accept variables and with_context --TEMPLATE-- {{ include("foo.twig") }} {{- include("foo.twig", with_context = false) }} {{- include("foo.twig", {'foo1': 'bar'}) }} {{- include("foo.twig", {'foo1': 'bar'}, with_context = false) }} --TEMPLATE(foo.twig)-- {% for k, v in _context %}{{ k }},{% endfor %} --DATA-- return array('foo' => 'bar') --EXPECT-- foo,global,_parent, global,_parent, foo,global,foo1,_parent, foo1,global,_parent,