From: Charles Date: Thu, 20 Sep 2012 11:35:44 +0000 (+0700) Subject: Fix NativeExtensionTest X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=db3cb803d2b5c760c943836c27164648bb5f0463;p=web%2Fkonrad%2Ftwig.git Fix NativeExtensionTest --- 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. } }