Skip to content

Commit

Permalink
Make compatible with phpunit 3.7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yakobe authored and willdurand committed May 16, 2014
1 parent 5e6ad9c commit 015df72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Factory/FormatterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
}
}
2 changes: 1 addition & 1 deletion Tests/Factory/FormatterFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 015df72

Please # to comment.