Add assertEquals to NativeExtensionTest.php
authorCharles <char101@ui.ac.id>
Mon, 24 Sep 2012 02:04:21 +0000 (09:04 +0700)
committerCharles <char101@ui.ac.id>
Mon, 24 Sep 2012 02:04:21 +0000 (09:04 +0700)
test/Twig/Tests/NativeExtensionTest.php

index 8329cd8..d828436 100644 (file)
@@ -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);
        }
 }