Add sender settings to test defaults

[MAILPOET-2209]
This commit is contained in:
Jan Jakeš
2019-08-21 15:44:55 +02:00
committed by M. Shull
parent f97ec1b53e
commit 1057f43d1c

View File

@@ -18,6 +18,7 @@ class Settings {
function withDefaultSettings() {
$this->withCronTriggerMethod('WordPress');
$this->withSendingMethodSmtpMailhog();
$this->withSender('admin', 'wp@example.com');
$this->withSkippedTutorials();
$this->withCookieRevenueTracking();
}
@@ -27,6 +28,11 @@ class Settings {
return $this;
}
function withSender($name, $address) {
$this->settings->set('sender.name', $name);
$this->settings->set('sender.address', $address);
}
function withConfirmationEmailSubject($subject = null) {
if ($subject === null) {
$subject = sprintf('Confirm your subscription to %1$s', get_option('blogname'));