public function EmailContext::disableEmailSpool in Open Social 8.7
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 8.3 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 8.4 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 8.5 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 8.6 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 8.8 tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 10.3.x tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 10.0.x tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 10.1.x tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
- 10.2.x tests/behat/features/bootstrap/EmailContext.php \Drupal\social\Behat\EmailContext::disableEmailSpool()
Revert back to the old situation (native PHP mail).
@AfterScenario @email-spool
File
- tests/
behat/ features/ bootstrap/ EmailContext.php, line 35
Class
Namespace
Drupal\social\BehatCode
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();
}