From ab93b4061f35be4933b6ac0177802ee4d669a283 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Tue, 2 Apr 2024 14:37:41 +0200 Subject: [PATCH] Fix tests on older pest versions --- tests/MicrosoftGraphTransportTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/MicrosoftGraphTransportTest.php b/tests/MicrosoftGraphTransportTest.php index 140fffc..259d7bd 100644 --- a/tests/MicrosoftGraphTransportTest.php +++ b/tests/MicrosoftGraphTransportTest.php @@ -239,7 +239,7 @@ ]); expect(fn () => Mail::to('caleb@livewire.com')->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) { @@ -247,7 +247,7 @@ Config::set('mail.default', 'microsoft-graph'); expect(fn () => Mail::to('caleb@livewire.com')->send(new TestMail(false))) - ->toThrow($exception); + ->toThrow(get_class($exception), $exception->getMessage()); })->with([ [ [