diff --git a/tests/Notifications/CheckFailedNotificationTest.php b/tests/Notifications/CheckFailedNotificationTest.php index 6c3afe49..4aeb1fd6 100644 --- a/tests/Notifications/CheckFailedNotificationTest.php +++ b/tests/Notifications/CheckFailedNotificationTest.php @@ -1,10 +1,7 @@ assertSuccessful(); @@ -25,7 +22,7 @@ Notification::assertNothingSent(); }); -it('will send a notification when one of the checks has a message', function() { +it('will send a notification when one of the checks has a message', function () { registerFailingCheck(); artisan(RunHealthChecksCommand::class)->assertSuccessful(); @@ -33,7 +30,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 1); }); -it('will not send any notifications if the config option is set to false', function() { +it('will not send any notifications if the config option is set to false', function () { config()->set('health.notifications.enabled', false); registerFailingCheck(); @@ -43,7 +40,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 0); }); -it('will only send one failed notification per hour', function() { +it('will only send one failed notification per hour', function () { TestTime::freeze(); registerFailingCheck(); @@ -59,7 +56,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 2); }); -it('can configure the throttle notifications key', function() { +it('can configure the throttle notifications key', function () { TestTime::freeze(); registerFailingCheck(); @@ -75,17 +72,17 @@ Notification::assertSentTimes(CheckFailedNotification::class, 2); }); -test('the notification can be rendered to mail', function() { +test('the notification can be rendered to mail', function () { $notification = (new CheckFailedNotification([])); $notification->shouldSend(new Notifiable(), 'mail'); $mailable = $notification->toMail(); - $html = (string)$mailable->render(); + $html = (string) $mailable->render(); expect($html)->toBeString(); }); -it('can disable warning notifications', function() { +it('can disable warning notifications', function () { TestTime::freeze(); Health::checks([ $check = FakeUsedDiskSpaceCheck::new() @@ -104,7 +101,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 1); }); -it('can disable failure notifications', function() { +it('can disable failure notifications', function () { TestTime::freeze(); Health::checks([ $check = FakeUsedDiskSpaceCheck::new() @@ -123,7 +120,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 1); }); -it('can change warning throttle time', function() { +it('can change warning throttle time', function () { TestTime::freeze(); Health::checks([ $check = FakeUsedDiskSpaceCheck::new() @@ -150,7 +147,7 @@ Notification::assertSentTimes(CheckFailedNotification::class, 3); }); -it('can change failure throttle time', function() { +it('can change failure throttle time', function () { TestTime::freeze(); Health::checks([ $check = FakeUsedDiskSpaceCheck::new() @@ -177,13 +174,14 @@ Notification::assertSentTimes(CheckFailedNotification::class, 3); }); -it('can dispatch notifications for crashed check', function() { +it('can dispatch notifications for crashed check', function () { TestTime::freeze(); Health::checks([ - new class extends Check { + new class extends Check + { public function run(): Result { - return new Result(Status::crashed(),'Check Crashed', 'Check Crashed'); + return new Result(Status::crashed(), 'Check Crashed', 'Check Crashed'); } }, ]);