Apply fixes from StyleCI

This commit is contained in:
James Brooks
2019-11-13 08:51:36 +00:00
committed by StyleCI Bot
parent 62308b30e4
commit 83f7aa9b4c
2 changed files with 5 additions and 9 deletions

View File

@@ -72,7 +72,7 @@ class NewIncidentNotification extends Notification
$content = trans('notifications.incident.new.mail.content', [ $content = trans('notifications.incident.new.mail.content', [
'name' => $this->incident->name, 'name' => $this->incident->name,
]); ]);
return (new MailMessage()) return (new MailMessage())
->subject(trans('notifications.incident.new.mail.subject')) ->subject(trans('notifications.incident.new.mail.subject'))
->markdown('notifications.incident.new', [ ->markdown('notifications.incident.new', [

View File

@@ -98,7 +98,6 @@ class MailTest extends AbstractTestCase
{ {
$name = $incident['title']; $name = $incident['title'];
$message = $incident['description']; $message = $incident['description'];
dispatch(new CreateIncidentCommand( dispatch(new CreateIncidentCommand(
$name, $name,
@@ -129,13 +128,12 @@ class MailTest extends AbstractTestCase
$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);
$response = $this->post('dashboard/incidents/create', [ $response = $this->post('dashboard/incidents/create', [
'name' => $this->fakerFactory->word, 'name' => $this->fakerFactory->word,
'status' => 1, 'status' => 1,
'visible' => 1, 'visible' => 1,
'message' => $this->fakerFactory->paragraph, 'message' => $this->fakerFactory->paragraph,
'notify' => 1 'notify' => 1,
]); ]);
Notification::assertSentTo( Notification::assertSentTo(
@@ -153,13 +151,13 @@ class MailTest extends AbstractTestCase
$this->signIn(); $this->signIn();
$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);
$response = $this->post('dashboard/incidents/create', [ $response = $this->post('dashboard/incidents/create', [
'name' => $this->fakerFactory->word, 'name' => $this->fakerFactory->word,
'status' => 1, 'status' => 1,
'visible' => 1, 'visible' => 1,
'message' => $this->fakerFactory->paragraph, 'message' => $this->fakerFactory->paragraph,
'notify' => 0 'notify' => 0,
]); ]);
Notification::assertNotSentTo( Notification::assertNotSentTo(
@@ -174,13 +172,11 @@ class MailTest extends AbstractTestCase
public function testEmailNotificationSentForIncidentUpdate() public function testEmailNotificationSentForIncidentUpdate()
{ {
Notification::fake(); Notification::fake();
$this->signIn(); $this->signIn();
$incident = $this->createIncident($this->incidents[1]); $incident = $this->createIncident($this->incidents[1]);
$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail); $subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);
$response = $this->post('dashboard/incidents/'.$incident->id.'/updates/create', [ $response = $this->post('dashboard/incidents/'.$incident->id.'/updates/create', [
'status' => 1, 'status' => 1,
@@ -191,4 +187,4 @@ class MailTest extends AbstractTestCase
[$subscriber], IncidentUpdatedNotification::class [$subscriber], IncidentUpdatedNotification::class
); );
} }
} }