You are here

protected function YamlFormTestTrait::getLastEmail in YAML Form 8

Gets that last email sent during the currently running test case.

Return value

array An array containing the last email message captured during the current test.

2 calls to YamlFormTestTrait::getLastEmail()
YamlFormHandlerEmailAdvancedTest::testAdvancedEmailHandler in src/Tests/YamlFormHandlerEmailAdvancedTest.php
Test advanced email handler.
YamlFormHandlerEmailBasicTest::testBasicEmailHandler in src/Tests/YamlFormHandlerEmailBasicTest.php
Test basic email handler.

File

src/Tests/YamlFormTestTrait.php, line 386

Class

YamlFormTestTrait
Defines form test trait.

Namespace

Drupal\yamlform\Tests

Code

protected function getLastEmail() {
  $sent_emails = $this
    ->drupalGetMails();
  $sent_email = end($sent_emails);
  $this
    ->debug($sent_email);
  return $sent_email;
}