Omeka_Test_Helper_Mail

class Omeka_Test_Helper_Mail

Package: Test\Helper

Encapsulates testing functionality for email.

property _path

Path to the mail storage directory.

__construct(string $path)
Parameters:
  • $path (string) – Real path to the mail storage directory.
factory()

Configure an instance of the Mail helper using the registered test_config.

Returns:Omeka_Test_Helper_Mail
_getIterator()

Get an iterator over the fakemail directory.

Returns:DirectoryIterator
_isMailFile(SplFileInfo $file)

Check if a directory entry is a mail message file.

Parameters:
  • $file (SplFileInfo) –
Returns:

boolean

getMailText(integer $index = 0)

Return the text of the n’th email that was sent during the test.

Note that this will not return correct results if reset() was notinvoked between test runs.

Parameters:
  • $index (integer) –
Returns:

string

count()

The number of mails that have been sent.