From c23ef25c8c1e0d1ce939b86b1ce2d89eb1a1c138 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 24 Sep 2012 09:04:21 +0700 Subject: [PATCH] Add assertEquals to NativeExtensionTest.php --- test/Twig/Tests/NativeExtensionTest.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) 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); } } -- 1.7.2.5