Skip to content

Commit a9086f2

Browse files
committed
Refactored some tests. Added new tests covered bugs to fix
1 parent 9b71490 commit a9086f2

File tree

8 files changed

+159
-82
lines changed

8 files changed

+159
-82
lines changed

app/Mail/OrderShipped.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ class OrderShipped extends Mailable
1717
*/
1818
public function __construct()
1919
{
20-
//
20+
$this->subject('Hello world')
21+
22+
->bcc(['[email protected]'])
23+
->replyTo('[email protected]', 'To name')
24+
->attach(app()->basePath('.env.example'));
2125
}
2226

2327
/**
@@ -27,6 +31,7 @@ public function __construct()
2731
*/
2832
public function build()
2933
{
30-
return $this->markdown('emails.orders.shipped');
34+
return $this
35+
->markdown('emails.orders.shipped');
3136
}
3237
}

app/Mail/WelcomeMail.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace App\Mail;
5+
6+
use Illuminate\Bus\Queueable;
7+
use Illuminate\Mail\Mailable;
8+
use Illuminate\Queue\SerializesModels;
9+
10+
class WelcomeMail extends Mailable
11+
{
12+
//use Queueable, SerializesModels;
13+
14+
public function __construct()
15+
{
16+
}
17+
18+
/**
19+
* Build the message.
20+
*
21+
* @return $this
22+
*/
23+
public function build()
24+
{
25+
return $this
26+
->markdown('emails.welcome');
27+
}
28+
}

0 commit comments

Comments
 (0)