ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Tests_NativeExtensionTest Class Reference
+ Inheritance diagram for Twig_Tests_NativeExtensionTest:
+ Collaboration diagram for Twig_Tests_NativeExtensionTest:

Public Member Functions

 testGetProperties ()
 PHP 5.3 More...
 

Detailed Description

Definition at line 12 of file NativeExtensionTest.php.

Member Function Documentation

◆ testGetProperties()

Twig_Tests_NativeExtensionTest::testGetProperties ( )

PHP 5.3

Definition at line 17 of file NativeExtensionTest.php.

References $output, and array.

18  {
19  $twig = new Twig_Environment(new Twig_Loader_Array(array('index' => '{{ d1.date }}{{ d2.date }}')), array(
20  'debug' => true,
21  'cache' => false,
22  'autoescape' => false,
23  ));
24 
25  $d1 = new DateTime();
26  $d2 = new DateTime();
27  $output = $twig->render('index', compact('d1', 'd2'));
28 
29  // If it fails, PHP will crash.
30  $this->assertEquals($output, $d1->date.$d2->date);
31  }
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
Create styles array
The data for the language used.
Stores the Twig configuration.
Definition: Environment.php:17
Loads a template from an array.
Definition: Array.php:26

The documentation for this class was generated from the following file: