]> BookStack Code Mirror - bookstack/blobdiff - tests/TestEmailTest.php
Updated minimum php version from 7.3 to 7.4
[bookstack] / tests / TestEmailTest.php
index 76ff322fff6e0dae8ede4d175ef3e4b46ffa3c6b..e0350371afe00707ce8eb87f6597018e3f94f424 100644 (file)
@@ -1,4 +1,6 @@
-<?php namespace Tests;
+<?php
+
+namespace Tests;
 
 use BookStack\Notifications\TestEmail;
 use Illuminate\Contracts\Notifications\Dispatcher;
@@ -6,7 +8,6 @@ use Illuminate\Support\Facades\Notification;
 
 class TestEmailTest extends TestCase
 {
-
     public function test_a_send_test_button_shows()
     {
         $pageView = $this->asAdmin()->get('/settings/maintenance');
@@ -33,7 +34,7 @@ class TestEmailTest extends TestCase
         $this->app[Dispatcher::class] = $mockDispatcher;
 
         $exception = new \Exception('A random error occurred when testing an email');
-        $mockDispatcher->shouldReceive('send')->andThrow($exception);
+        $mockDispatcher->shouldReceive('sendNow')->andThrow($exception);
 
         $admin = $this->getAdmin();
         $sendReq = $this->actingAs($admin)->post('/settings/maintenance/send-test-email');
@@ -57,6 +58,4 @@ class TestEmailTest extends TestCase
         $sendReq = $this->actingAs($user)->post('/settings/maintenance/send-test-email');
         Notification::assertSentTo($user, TestEmail::class);
     }
-
-
-}
\ No newline at end of file
+}