Skip to content

Commit

Permalink
clean up policy plugin for mailer log after running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Ragas committed Aug 22, 2023
1 parent f37da24 commit 5e24861
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/behat/features/bootstrap/EmailContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ public function disableEmailSpool() {
MailerTransport::load($default_id)->setAsDefault();
\Drupal::state()->delete('default_mailer_transport');
}

// Remove the mail logger plugin to the default policy.
$default_mailer_policy = MailerPolicy::load('_');
$mailer_configuration = $default_mailer_policy->getConfiguration();
unset($mailer_configuration['log_mail']);
$default_mailer_policy->setConfiguration($mailer_configuration);
$default_mailer_policy->save();
}

/**
Expand Down

0 comments on commit 5e24861

Please sign in to comment.