From 83f7aa9b4c56bc736e08e90c01f93055e493d369 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 13 Nov 2019 08:51:36 +0000 Subject: [PATCH] Apply fixes from StyleCI --- .../Incident/NewIncidentNotification.php | 2 +- tests/Functional/Notifications/MailTest.php | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/Notifications/Incident/NewIncidentNotification.php b/app/Notifications/Incident/NewIncidentNotification.php index 1b5c7637..c0f956b2 100644 --- a/app/Notifications/Incident/NewIncidentNotification.php +++ b/app/Notifications/Incident/NewIncidentNotification.php @@ -72,7 +72,7 @@ class NewIncidentNotification extends Notification $content = trans('notifications.incident.new.mail.content', [ 'name' => $this->incident->name, ]); - + return (new MailMessage()) ->subject(trans('notifications.incident.new.mail.subject')) ->markdown('notifications.incident.new', [ diff --git a/tests/Functional/Notifications/MailTest.php b/tests/Functional/Notifications/MailTest.php index 364d37bc..10449a85 100644 --- a/tests/Functional/Notifications/MailTest.php +++ b/tests/Functional/Notifications/MailTest.php @@ -98,7 +98,6 @@ class MailTest extends AbstractTestCase { $name = $incident['title']; $message = $incident['description']; - dispatch(new CreateIncidentCommand( $name, @@ -129,13 +128,12 @@ class MailTest extends AbstractTestCase $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); - $response = $this->post('dashboard/incidents/create', [ 'name' => $this->fakerFactory->word, 'status' => 1, 'visible' => 1, 'message' => $this->fakerFactory->paragraph, - 'notify' => 1 + 'notify' => 1, ]); Notification::assertSentTo( @@ -153,13 +151,13 @@ class MailTest extends AbstractTestCase $this->signIn(); $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); - + $response = $this->post('dashboard/incidents/create', [ 'name' => $this->fakerFactory->word, 'status' => 1, 'visible' => 1, 'message' => $this->fakerFactory->paragraph, - 'notify' => 0 + 'notify' => 0, ]); Notification::assertNotSentTo( @@ -174,13 +172,11 @@ class MailTest extends AbstractTestCase public function testEmailNotificationSentForIncidentUpdate() { Notification::fake(); - $this->signIn(); $incident = $this->createIncident($this->incidents[1]); $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); - $response = $this->post('dashboard/incidents/'.$incident->id.'/updates/create', [ 'status' => 1, @@ -191,4 +187,4 @@ class MailTest extends AbstractTestCase [$subscriber], IncidentUpdatedNotification::class ); } -} \ No newline at end of file +}