protected function WebformBrowserTestTrait::getLastEmail in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::getLastEmail()
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.
8 calls to WebformBrowserTestTrait::getLastEmail()
- WebformAttachmentTest::testWebformAttachment in modules/
webform_attachment/ tests/ src/ Functional/ WebformAttachmentTest.php - Tests webform attachment.
- WebformBrowserTestBaseTest::testWebformBase in tests/
src/ Functional/ WebformBrowserTestBaseTest.php - Test base helper methods.
- WebformEntityPrintAttachmentFunctionalTest::testEntityPrintAttachment in modules/
webform_entity_print_attachment/ tests/ src/ Functional/ WebformEntityPrintAttachmentFunctionalTest.php - Test entity print attachment.
- WebformHandlerEmailAdvancedTest::testAdvancedEmailHandler in tests/
src/ Functional/ Handler/ WebformHandlerEmailAdvancedTest.php - Test advanced email handler.
- WebformHandlerEmailBasicTest::testBasicEmailHandler in tests/
src/ Functional/ Handler/ WebformHandlerEmailBasicTest.php - Test basic email handler.
File
- tests/
src/ Traits/ WebformBrowserTestTrait.php, line 424
Class
- WebformBrowserTestTrait
- Provides convenience methods for webform assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function getLastEmail() {
$sent_emails = $this
->getMails();
$sent_email = end($sent_emails);
$this
->debug($sent_email);
return $sent_email;
}