From 015df72364c91331ff4f188ce63b154650991b0e Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 7 Apr 2014 18:25:09 +0200 Subject: [PATCH] Make compatible with phpunit 3.7.x --- Factory/FormatterFactory.php | 4 ++-- Tests/Factory/FormatterFactoryTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Factory/FormatterFactory.php b/Factory/FormatterFactory.php index 8b9361e..aa6e28c 100644 --- a/Factory/FormatterFactory.php +++ b/Factory/FormatterFactory.php @@ -26,10 +26,10 @@ public static function createClosure($generator, $method, array $parameters = ar return function () use ($generator, $method, $parameters, $optional) { if (null !== $optional && $generator instanceof Generator) { - $generator = $generator->optional((double)$optional); + $generator = $generator->optional((double) $optional); } - return call_user_func_array(array($generator, $method), (array)$parameters); + return call_user_func_array(array($generator, $method), (array) $parameters); }; } } diff --git a/Tests/Factory/FormatterFactoryTest.php b/Tests/Factory/FormatterFactoryTest.php index ea3efe2..50a6f58 100644 --- a/Tests/Factory/FormatterFactoryTest.php +++ b/Tests/Factory/FormatterFactoryTest.php @@ -43,7 +43,7 @@ public function testCreateClosureWithOptional() $generator ->expects($this->once()) ->method('optional') - ->willReturn($generator) + ->will($this->returnValue($generator)) ; $closure = FormatterFactory::createClosure($generator, 'foo', array(), null, 0.1);