@@ -20,7 +20,9 @@ public function it_extracts_the_recipient()
20
20
(new TestMailable ())->to (['jane@doe.com ' ])
21
21
);
22
22
23
- $ this ->assertEquals (['john@doe.com ' , 'jane@doe.com ' ], $ composer ->getData ('recipient ' ));
23
+ $ this ->assertCount (2 , $ composer ->getData ('recipient ' ));
24
+ $ this ->assertContains ('john@doe.com ' , $ composer ->getData ('recipient ' ));
25
+ $ this ->assertContains ('jane@doe.com ' , $ composer ->getData ('recipient ' ));
24
26
}
25
27
26
28
/** @test */
@@ -107,29 +109,20 @@ public function it_extracts_the_from_address_and_or_name()
107
109
class TestMailable extends Mailable
108
110
{
109
111
/**
110
- * Create a new message instance .
112
+ * Build the message.
111
113
*
112
- * @return void
114
+ * @return $this
113
115
*/
114
- public function __construct ()
116
+ public function build ()
115
117
{
116
- $ this ->to ('john@doe.com ' )
118
+ return $ this ->to ('john@doe.com ' )
117
119
->cc (['john+cc@doe.com ' , 'john+cc2@doe.com ' ])
118
120
->bcc (['john+bcc@doe.com ' , 'john+bcc2@doe.com ' ])
119
121
->subject ('Your order has shipped! ' )
120
122
->attach (__DIR__ . '/files/pdf-sample.pdf ' , [
121
123
'mime ' => 'application/pdf ' ,
122
124
])
123
- ->attachData ('<p>Thanks for your oder</p> ' , 'order.html ' );
124
- }
125
-
126
- /**
127
- * Build the message.
128
- *
129
- * @return $this
130
- */
131
- public function build ()
132
- {
133
- return $ this ->view ('tests::dummy ' , ['name ' => 'John Doe ' ]);
125
+ ->attachData ('<p>Thanks for your oder</p> ' , 'order.html ' )
126
+ ->view ('tests::dummy ' , ['name ' => 'John Doe ' ]);
134
127
}
135
128
}
0 commit comments