Skip to content

Commit

Permalink
Fix tests on older pest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Apr 2, 2024
1 parent 64d8010 commit ab93b40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/MicrosoftGraphTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@
]);

expect(fn () => Mail::to('[email protected]')->send(new TestMail(false)))
->toThrow(new InvalidResponse('Expected response to contain key access_token of type string, got: 123.'));
->toThrow(InvalidResponse::class, 'Expected response to contain key access_token of type string, got: 123.');
});

it('throws exceptions when config is invalid', function (array $config, Exception $exception) {
Config::set('mail.mailers.microsoft-graph', $config);
Config::set('mail.default', 'microsoft-graph');

expect(fn () => Mail::to('[email protected]')->send(new TestMail(false)))
->toThrow($exception);
->toThrow(get_class($exception), $exception->getMessage());
})->with([
[
[
Expand Down

0 comments on commit ab93b40

Please sign in to comment.