File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use Illuminate \Support \Facades \Schema ;
4
- use Illuminate \Database \Schema \Blueprint ;
5
3
use Illuminate \Database \Migrations \Migration ;
4
+ use Illuminate \Database \Schema \Blueprint ;
5
+ use Illuminate \Support \Facades \Schema ;
6
6
7
7
class CreateEmailLogsTable extends Migration
8
8
{
@@ -15,9 +15,8 @@ public function up()
15
15
{
16
16
Schema::create ('email_logs ' , function (Blueprint $ table ) {
17
17
$ table ->increments ('id ' );
18
- // $table->unsignedInteger('user_id')->nullable();
19
18
$ table ->string ('subject ' );
20
- $ table ->text ('body ' );
19
+ $ table ->text ('body ' )-> nullable () ;
21
20
22
21
$ table ->timestamp ('created_at ' );
23
22
});
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ public function handle($event)
8
8
{
9
9
EmailLog::create ([
10
10
'subject ' => $ event ->message ->getSubject (),
11
- 'body ' => $ event ->message ->getBody (),
12
11
]);
13
12
}
14
13
}
Original file line number Diff line number Diff line change 3
3
namespace Krisell \LaravelEmailLogger \Tests ;
4
4
5
5
use Carbon \Carbon ;
6
- use Orchestra \Testbench \TestCase ;
7
6
use Illuminate \Foundation \Auth \User ;
7
+ use Illuminate \Foundation \Testing \RefreshDatabase ;
8
8
use Illuminate \Support \Facades \Mail ;
9
9
use Krisell \LaravelEmailLogger \EmailLog ;
10
- use Illuminate \Foundation \Testing \RefreshDatabase ;
11
- use Krisell \LaravelEmailLogger \Tests \TestMailable ;
12
10
use Krisell \LaravelEmailLogger \LaravelEmailLoggerServiceProvider ;
11
+ use Krisell \LaravelEmailLogger \Tests \TestMailable ;
12
+ use Orchestra \Testbench \TestCase ;
13
13
14
14
class ExampleTest extends TestCase
15
15
{
@@ -31,6 +31,5 @@ public function a_test()
31
31
$ event = EmailLog::first ();
32
32
$ this ->assertNotNull ($ event ->created_at );
33
33
$ this ->assertEquals ('Test mail subject ' , $ event ->subject );
34
- $ this ->assertEquals ('<h2>Email content. Good stuff.</h2> ' , $ event ->body );
35
34
}
36
35
}
You can’t perform that action at this time.
0 commit comments