From cbbcd89206934606d115c170df740069b7353992 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 19 Sep 2013 13:41:22 +0200 Subject: [PATCH] fixed some tests as hhvm always returns false for ReflectionArgument::isOptional() --- test/Twig/Tests/Node/Expression/CallTest.php | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Twig/Tests/Node/Expression/CallTest.php b/test/Twig/Tests/Node/Expression/CallTest.php index 53b5e6e..c54ea1e 100644 --- a/test/Twig/Tests/Node/Expression/CallTest.php +++ b/test/Twig/Tests/Node/Expression/CallTest.php @@ -14,7 +14,7 @@ class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase public function testGetArguments() { $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->assertEquals(array('U'), $node->getArguments('date', array('format' => 'U'))); + $this->assertEquals(array('U', null), $node->getArguments('date', array('format' => 'U', 'timestamp' => null))); } /** @@ -44,7 +44,7 @@ class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase public function testGetArgumentsWithWrongNamedArgumentName() { $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('Y-m-d', 'unknown' => '')); + $node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown' => '')); } /** @@ -54,7 +54,7 @@ class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase public function testGetArgumentsWithWrongNamedArgumentNames() { $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('Y-m-d', 'unknown1' => '', 'unknown2' => '')); + $node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => '')); } } -- 1.7.2.5