Fix NativeExtensionTest
authorCharles <char101@ui.ac.id>
Thu, 20 Sep 2012 11:35:44 +0000 (18:35 +0700)
committerCharles <char101@ui.ac.id>
Thu, 20 Sep 2012 11:35:44 +0000 (18:35 +0700)
test/Twig/Tests/NativeExtensionTest.php

index 936c127..6983389 100644 (file)
@@ -13,14 +13,17 @@ class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
 {
     public function testGetProperties()
     {
-        $loader = new Twig_Loader_String('{{ d1.date }}{{ d2.date }}');
-
-        $twig = new Twig_Environment($loader, array(
+        $twig = new Twig_Environment(new Twig_Loader_String(), array(
             'debug'      => true,
             'cache'      => false,
-            'autoescape' => array($this, 'escapingStrategyCallback'),
+            'autoescape' => false
         ));
 
+               $twig->render('{{ d1.date }}{{ d2.date }}', array(
+                       'd1' => new DateTime,
+                       'd2' => new DateTime
+               ));
+
                // If it fails, PHP will crash.
     }
 }