PHP Classes

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

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

Contents

Class file image Download
--TEST-- "autoescape" tag does not apply escaping on literals --TEMPLATE-- {% autoescape 'html' %} 1. Simple literal {{ "<br />" }} 2. Conditional expression with only literals {{ true ? "<br />" : "<br>" }} 3. Conditional expression with a variable {{ true ? "<br />" : someVar }} 4. Nested conditionals with only literals {{ true ? (true ? "<br />" : "<br>") : "\n" }} 5. Nested conditionals with a variable {{ true ? (true ? "<br />" : someVar) : "\n" }} 6. Nested conditionals with a variable marked safe {{ true ? (true ? "<br />" : someVar|raw) : "\n" }} {% endautoescape %} --DATA-- return array() --EXPECT-- 1. Simple literal <br /> 2. Conditional expression with only literals <br /> 3. Conditional expression with a variable &lt;br /&gt; 4. Nested conditionals with only literals <br /> 5. Nested conditionals with a variable &lt;br /&gt; 6. Nested conditionals with a variable marked safe <br />