From: Fabien Potencier Date: Thu, 19 Sep 2013 11:41:22 +0000 (+0200) Subject: fixed some tests as hhvm always returns false for ReflectionArgument::isOptional() X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=cbbcd89206934606d115c170df740069b7353992;p=web%2Fkonrad%2Ftwig.git fixed some tests as hhvm always returns false for ReflectionArgument::isOptional() --- 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' => '')); } }