Skip to content

Commit 6d2dc3a

Browse files
committed
seeInEmailSubject method.
1 parent 098d2f3 commit 6d2dc3a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Mailtrap.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,19 @@ public function seeInEmailHtmlBody($expected)
253253
$this->assertContains($expected, $email['html_body'], 'Email body contains HTML');
254254
}
255255

256+
/**
257+
* Look for a string in the most recent email subject.
258+
*
259+
* @param string $expected
260+
*
261+
* @return mixed
262+
*/
263+
public function seeInEmailSubject($expected)
264+
{
265+
$email = $this->fetchLastMessage();
266+
$this->assertContains($expected, $email['subject'], 'Email subject contains text');
267+
}
268+
256269
/**
257270
* Look for an attachment on the most recent email.
258271
*

0 commit comments

Comments
 (0)