Skip to content

Commit

Permalink
Add exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
Olicek committed Feb 3, 2016
1 parent 4f2e719 commit 37e53ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MapAPI.php
Expand Up @@ -211,7 +211,7 @@ public function setWaypoint($key, array $waypoint)
{
if (!in_array($key, ['start', 'end', 'waypoint']))
{
throw new InvalidArgumentException;
throw new InvalidArgumentException('First argument must be "start|end|waypoint", ' . $key . ' was given');
}

if($key === 'waypoint')
Expand Down
2 changes: 1 addition & 1 deletion tests/GoogleAPI/MapAPITest.phpt
Expand Up @@ -313,7 +313,7 @@ class MapAPITest extends TestCase

Assert::exception(function () {
$this->map->setWaypoint('foo', ['position' => [20, 20]]);
}, InvalidArgumentException::class);
}, InvalidArgumentException::class, 'First argument must be "start|end|waypoint", foo was given');
}

}
Expand Down

0 comments on commit 37e53ba

Please sign in to comment.