ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 Sabre\VObject\$output.

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  }
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: