PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/functions/template_from_string.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/functions/template_from_string.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/functions/template_from_string.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: 456 bytes
 

Contents

Class file image Download
--TEST-- "template_from_string" function --TEMPLATE-- {% include template_from_string(template) %} {% include template_from_string("Hello {{ name }}") %} {% include template_from_string('{% extends "parent.twig" %}{% block content %}Hello {{ name }}{% endblock %}') %} --TEMPLATE(parent.twig)-- {% block content %}{% endblock %} --DATA-- return array('name' => 'Fabien', 'template' => "Hello {{ name }}") --EXPECT-- Hello Fabien Hello Fabien Hello Fabien