You are here

public function EmailContext::disableEmailSpool in Open Social 8.2

Same name and namespace in other branches
  1. 8 tests/behat/features/bootstrap/EmailContext.php \EmailContext::disableEmailSpool()

Revert back to the old situation (native PHP mail).

@AfterScenario @email-spool

File

tests/behat/features/bootstrap/EmailContext.php, line 33

Class

EmailContext

Code

public function disableEmailSpool() {

  // Update Drupal configuration.
  $swiftmailer_config = \Drupal::configFactory()
    ->getEditable('swiftmailer.transport');
  $swiftmailer_config
    ->set('transport', 'native');
  $swiftmailer_config
    ->save();

  // Clean up emails after us.
  $this
    ->purgeSpool();
}