public function EmailContext::getSpooledEmails in Open Social 8
Same name and namespace in other branches
- 8.2 tests/behat/features/bootstrap/EmailContext.php \EmailContext::getSpooledEmails()
Get a list of spooled emails.
Return value
Finder|null Returns a Finder if the directory exists.
2 calls to EmailContext::getSpooledEmails()
- EmailContext::findSubjectAndBody in tests/
behat/ features/ bootstrap/ EmailContext.php - Find an email with the given subject and body.
- EmailContext::purgeSpool in tests/
behat/ features/ bootstrap/ EmailContext.php - Purge the messages in the spool.
File
- tests/
behat/ features/ bootstrap/ EmailContext.php, line 49
Class
Code
public function getSpooledEmails() {
$finder = new Finder();
try {
$spoolDir = $this
->getSpoolDir();
$finder
->files()
->in($spoolDir);
return $finder;
} catch (InvalidArgumentException $exception) {
return NULL;
}
}