You are here

public function EmailContext::getSpooledEmails in Open Social 8.2

Same name and namespace in other branches
  1. 8 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

EmailContext

Code

public function getSpooledEmails() {
  $finder = new Finder();
  try {
    $spoolDir = $this
      ->getSpoolDir();
    $finder
      ->files()
      ->in($spoolDir);
    return $finder;
  } catch (InvalidArgumentException $exception) {
    return NULL;
  }
}