From e3708ebffbd500ab1b32d38ac41f47a59d2942b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jakes=CC=8C?= Date: Wed, 21 Aug 2019 15:52:41 +0200 Subject: [PATCH] Disable email notifications by default in tests [MAILPOET-2209] --- tests/DataFactories/Settings.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/DataFactories/Settings.php b/tests/DataFactories/Settings.php index 09ede191b9..db16bf0849 100644 --- a/tests/DataFactories/Settings.php +++ b/tests/DataFactories/Settings.php @@ -21,6 +21,7 @@ class Settings { $this->withSender('admin', 'wp@example.com'); $this->withSkippedTutorials(); $this->withCookieRevenueTracking(); + $this->withEmailNotificationsDisabled(); } function withCronTriggerMethod($method) { @@ -33,6 +34,12 @@ class Settings { $this->settings->set('sender.address', $address); } + function withEmailNotificationsDisabled() { + $this->settings->set('stats_notifications.enabled', 0); + $this->settings->set('subscriber_email_notification.enabled', 0); + return $this; + } + function withConfirmationEmailSubject($subject = null) { if ($subject === null) { $subject = sprintf('Confirm your subscription to %1$s', get_option('blogname'));