@@ -121,9 +121,9 @@ public function fetchMessages()
121
121
122
122
$ messages = json_decode ($ messages , true );
123
123
124
- foreach ($ messages as $ key => $ message ) {
125
- $ messages [$ key ] = new MailtrapMessage ($ message , $ this ->client );
126
- }
124
+ foreach ($ messages as $ key => $ message ) {
125
+ $ messages [$ key ] = new MailtrapMessage ($ message , $ this ->client );
126
+ }
127
127
128
128
return $ messages ;
129
129
}
@@ -290,18 +290,18 @@ public function seeInEmailHtmlBody($expected)
290
290
$ this ->assertContains ($ expected , $ email ->html_body , 'Email body contains HTML ' );
291
291
}
292
292
293
- /**
294
- * Look for a string in the most recent email subject.
295
- *
296
- * @param string $expected
297
- *
298
- * @return mixed
299
- */
300
- public function seeInEmailSubject ($ expected )
301
- {
302
- $ email = $ this ->fetchLastMessage ();
303
- $ this ->assertContains ($ expected , $ email ->subject , 'Email subject contains text ' );
304
- }
293
+ /**
294
+ * Look for a string in the most recent email subject.
295
+ *
296
+ * @param string $expected
297
+ *
298
+ * @return mixed
299
+ */
300
+ public function seeInEmailSubject ($ expected )
301
+ {
302
+ $ email = $ this ->fetchLastMessage ();
303
+ $ this ->assertContains ($ expected , $ email ->subject , 'Email subject contains text ' );
304
+ }
305
305
306
306
/**
307
307
* Look for an attachment on the most recent email.
@@ -335,7 +335,7 @@ public function seeAnAttachment($bool)
335
335
public function getBccEmailOfMessage ($ messageId )
336
336
{
337
337
$ message = $ this ->client ->get ("inboxes/ {$ this ->config ['inbox_id ' ]}/messages/ $ messageId/body.eml " )->getBody ();
338
-
338
+
339
339
if ($ message instanceof Stream) {
340
340
$ message = $ message ->getContents ();
341
341
}
@@ -369,7 +369,7 @@ protected function wait($timeout_in_second = 30, $interval_in_millisecond = 250)
369
369
public function waitForEmail ($ timeout = 5 )
370
370
{
371
371
$ condition = function () {
372
- return !empty ($ this ->fetchLastMessage ());
372
+ return !empty ($ this ->fetchLastMessage ());
373
373
};
374
374
375
375
$ message = sprintf ('Waited for %d secs but no email has arrived ' , $ timeout );
@@ -381,7 +381,7 @@ public function waitForEmail($timeout = 5)
381
381
* Wait until an email has been received with specific text in the text body.
382
382
*
383
383
* @param string $subject
384
- * @param int $timeout
384
+ * @param int $timeout
385
385
*
386
386
* @throws \Exception
387
387
*/
@@ -408,7 +408,7 @@ public function waitForEmailWithSubject($subject, $timeout = 5)
408
408
* Wait until an email has been received with specific text in the text body.
409
409
*
410
410
* @param string $text
411
- * @param int $timeout
411
+ * @param int $timeout
412
412
*
413
413
* @throws \Exception
414
414
*/
@@ -426,7 +426,8 @@ public function waitForEmailWithTextInTextBody($text, $timeout = 5)
426
426
return false ;
427
427
};
428
428
429
- $ message = sprintf ('Waited for %d secs but no email with the text body containing %s has arrived ' , $ timeout , $ text );
429
+ $ message = sprintf ('Waited for %d secs but no email with the text body containing %s has arrived ' , $ timeout ,
430
+ $ text );
430
431
431
432
$ this ->wait ($ timeout )->until ($ condition , $ message );
432
433
}
@@ -435,7 +436,7 @@ public function waitForEmailWithTextInTextBody($text, $timeout = 5)
435
436
* Wait until an email has been received with specific text in the text body.
436
437
*
437
438
* @param string $text
438
- * @param int $timeout
439
+ * @param int $timeout
439
440
*
440
441
* @throws \Exception
441
442
*/
@@ -453,7 +454,8 @@ public function waitForEmailWithTextInHTMLBody($text, $timeout = 5)
453
454
return false ;
454
455
};
455
456
456
- $ message = sprintf ('Waited for %d secs but no email with the html body containing %s has arrived ' , $ timeout , $ text );
457
+ $ message = sprintf ('Waited for %d secs but no email with the html body containing %s has arrived ' , $ timeout ,
458
+ $ text );
457
459
458
460
$ this ->wait ($ timeout )->until ($ condition , $ message );
459
461
}
0 commit comments