Skip to content

Commit

Permalink
Merge pull request #1112 from josephshanak/change-andreturnarg-except…
Browse files Browse the repository at this point in the history
…ion-message

Update error message to be more accurate
  • Loading branch information
davedevelopment committed Aug 16, 2021
2 parents ef4ba5b + f4a79a4 commit 2c91d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Mockery/Expectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public function andReturnUsing(...$args)
public function andReturnArg($index)
{
if (!is_int($index) || $index < 0) {
throw new \InvalidArgumentException("Invalid argument index supplied. Index must be a positive integer.");
throw new \InvalidArgumentException("Invalid argument index supplied. Index must be a non-negative integer.");
}
$closure = function (...$args) use ($index) {
if (array_key_exists($index, $args)) {
Expand Down

0 comments on commit 2c91d64

Please sign in to comment.