From db3cb803d2b5c760c943836c27164648bb5f0463 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 20 Sep 2012 18:35:44 +0700 Subject: [PATCH] Fix NativeExtensionTest --- test/Twig/Tests/NativeExtensionTest.php | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/Twig/Tests/NativeExtensionTest.php b/test/Twig/Tests/NativeExtensionTest.php index 936c127..6983389 100644 --- a/test/Twig/Tests/NativeExtensionTest.php +++ b/test/Twig/Tests/NativeExtensionTest.php @@ -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. } } -- 1.7.2.5