Adds support for receiving datasets in higher order tests

This commit is contained in:
luke
2021-07-21 07:40:19 +01:00
parent 47ceb2419b
commit 371620d161
3 changed files with 26 additions and 2 deletions

View File

@ -35,7 +35,7 @@ final class HigherOrderCallables
*/
public function expect($value)
{
return new Expectation($value instanceof Closure ? Reflection::bindCallable($value) : $value);
return new Expectation($value instanceof Closure ? Reflection::bindCallableWithData($value) : $value);
}
/**
@ -59,7 +59,7 @@ final class HigherOrderCallables
*/
public function tap(callable $callable)
{
Reflection::bindCallable($callable);
Reflection::bindCallableWithData($callable);
return $this->target;
}