Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
80.00% covered (warning)
80.00%
4 / 5
66.67% covered (warning)
66.67%
2 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
TestEmail
80.00% covered (warning)
80.00%
4 / 5
66.67% covered (warning)
66.67%
2 / 3
3.07
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 build
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
 attachments
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Mail;
4
5use Illuminate\Bus\Queueable;
6use Illuminate\Mail\Mailable;
7use Illuminate\Queue\SerializesModels;
8
9class TestEmail extends Mailable
10{
11    use Queueable, SerializesModels;
12
13    private string $name;
14
15    /**
16     * Create a new message instance.
17     *
18     * @return void
19     */
20    public function __construct()
21    {
22        //--
23    }
24
25    /**
26     * Get the message content definition.
27     *
28     * @return TestEmail
29     */
30    public function build(): TestEmail
31    {
32        return $this->from(env('MAIL_USERNAME'), env('MAIL_FROM_NAME'))
33            ->subject('Test')
34            ->view('mail.test');
35    }
36
37    /**
38     * Get the attachments for the message.
39     *
40     * @return array
41     */
42    public function attachments(): array
43    {
44        return [];
45    }
46}