public function withArgs($argsOrClosure)
{
if (is_array($argsOrClosure)) {
$this->withArgsInArray($argsOrClosure);
} elseif ($argsOrClosure instanceof Closure) {
$this->withArgsMatchedByClosure($argsOrClosure);
} else {
throw new \InvalidArgumentException(sprintf('Call to %s with an invalid argument (%s), only array and ' . 'closure are allowed', __METHOD__, $argsOrClosure));
}
return $this;
}
/** * @return $this */ public function withArgs(array $args) { $this->expectation->withArgs($args); return $this; }