From 40abea870dbb802b752eb294fad5ab9de1eec1e5 Mon Sep 17 00:00:00 2001 From: Julius Kiekbusch Date: Mon, 21 Feb 2022 16:15:30 +0100 Subject: [PATCH] Fix setPriority Call for MailChannel (#41120) --- src/Illuminate/Notifications/Channels/MailChannel.php | 2 +- .../Notifications/SendingMailNotificationsTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Notifications/Channels/MailChannel.php b/src/Illuminate/Notifications/Channels/MailChannel.php index 594320d5b791..fd3a3cc28911 100644 --- a/src/Illuminate/Notifications/Channels/MailChannel.php +++ b/src/Illuminate/Notifications/Channels/MailChannel.php @@ -143,7 +143,7 @@ protected function buildMessage($mailMessage, $notifiable, $notification, $messa $this->addAttachments($mailMessage, $message); if (! is_null($message->priority)) { - $mailMessage->setPriority($message->priority); + $mailMessage->priority($message->priority); } if ($message->tags) { diff --git a/tests/Integration/Notifications/SendingMailNotificationsTest.php b/tests/Integration/Notifications/SendingMailNotificationsTest.php index 053087054057..5fe74775f2ef 100644 --- a/tests/Integration/Notifications/SendingMailNotificationsTest.php +++ b/tests/Integration/Notifications/SendingMailNotificationsTest.php @@ -98,7 +98,7 @@ public function testMailIsSent() $message->shouldReceive('subject')->once()->with('Test Mail Notification'); - $message->shouldReceive('setPriority')->once()->with(1); + $message->shouldReceive('priority')->once()->with(1); $closure($message); @@ -144,7 +144,7 @@ public function testMailIsSentToNamedAddress() $message->shouldReceive('subject')->once()->with('Test Mail Notification'); - $message->shouldReceive('setPriority')->once()->with(1); + $message->shouldReceive('priority')->once()->with(1); $closure($message);