PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test

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

Contents

Class file image Download
--TEST-- "autoescape" tag applies escaping to object method calls --TEMPLATE-- {% autoescape 'html' %} {{ user.name }} {{ user.name|lower }} {{ user }} {% endautoescape %} --DATA-- class UserForAutoEscapeTest { public function getName() { return 'Fabien<br />'; } public function __toString() { return 'Fabien<br />'; } } return array('user' => new UserForAutoEscapeTest()) --EXPECT-- Fabien&lt;br /&gt; fabien&lt;br /&gt; Fabien&lt;br /&gt;