function MethodProphecy::withArguments
Sets argument wildcard.
Parameters
array<mixed>|Argument\ArgumentsWildcard $arguments:
Return value
$this
Throws
\Prophecy\Exception\InvalidArgumentException
1 call to MethodProphecy::withArguments()
- MethodProphecy::__construct in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ MethodProphecy.php - @internal
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ MethodProphecy.php, line 197
Class
- MethodProphecy
- Method prophecy.
Namespace
Prophecy\ProphecyCode
public function withArguments($arguments) {
if (is_array($arguments)) {
$arguments = new Argument\ArgumentsWildcard($arguments);
}
if (!$arguments instanceof Argument\ArgumentsWildcard) {
throw new InvalidArgumentException(sprintf("Either an array or an instance of ArgumentsWildcard expected as\n" . 'a `MethodProphecy::withArguments()` argument, but got %s.', gettype($arguments)));
}
$this->argumentsWildcard = $arguments;
return $this;
}