PHP Classes

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

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

Contents

Class file image Download
--TEST-- "attribute" function --TEMPLATE-- {{ attribute(obj, method) }} {{ attribute(array, item) }} {{ attribute(obj, "bar", ["a", "b"]) }} {{ attribute(obj, method) is defined ? 'ok' : 'ko' }} {{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }} --DATA-- return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx') --EXPECT-- foo bar bar_a-b ok ko