From: Charles Date: Mon, 24 Sep 2012 02:04:21 +0000 (+0700) Subject: Add assertEquals to NativeExtensionTest.php X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c23ef25c8c1e0d1ce939b86b1ce2d89eb1a1c138;p=web%2Fkonrad%2Ftwig.git Add assertEquals to NativeExtensionTest.php --- diff --git a/test/Twig/Tests/NativeExtensionTest.php b/test/Twig/Tests/NativeExtensionTest.php index 8329cd8..d828436 100644 --- a/test/Twig/Tests/NativeExtensionTest.php +++ b/test/Twig/Tests/NativeExtensionTest.php @@ -19,11 +19,11 @@ class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase 'autoescape' => false )); - $twig->render('{{ d1.date }}{{ d2.date }}', array( - 'd1' => new DateTime, - 'd2' => new DateTime - )); + $d1 = new DateTime; + $d2 = new DateTime; + $output = $twig->render('{{ d1.date }}{{ d2.date }}', compact('d1', 'd2')); // If it fails, PHP will crash. + $this->assertEquals($output, $d1->date . $d2->date); } }