public function EmailContext::iShouldHaveAnEmailWithTitleAndBodyMulti in Open Social 8
Same name and namespace in other branches
- 8.2 tests/behat/features/bootstrap/EmailContext.php \EmailContext::iShouldHaveAnEmailWithTitleAndBodyMulti()
I read an email with multiple content.
@Then I should have an email with subject :arg1 and in the content:
File
- tests/
behat/ features/ bootstrap/ EmailContext.php, line 184
Class
Code
public function iShouldHaveAnEmailWithTitleAndBodyMulti($subject, TableNode $table) {
$body = [];
$hash = $table
->getHash();
foreach ($hash as $row) {
$body[] = $row['content'];
}
$found_email = $this
->findSubjectAndBody($subject, $body);
if (!$found_email) {
throw new \Exception('There is no email with that subject and body.');
}
}