From 47a604d2c5b51ec190882809fc9cd870ec314de1 Mon Sep 17 00:00:00 2001 From: David Remer Date: Mon, 14 Aug 2023 09:07:09 +0300 Subject: [PATCH] Take into account that the newsletter is scheduled at 5:45 and not 5:00 [MAILPOET-5528] --- .../integration/Newsletter/Scheduler/PostNotificationTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailpoet/tests/integration/Newsletter/Scheduler/PostNotificationTest.php b/mailpoet/tests/integration/Newsletter/Scheduler/PostNotificationTest.php index 0ab894cc9b..69900c9235 100644 --- a/mailpoet/tests/integration/Newsletter/Scheduler/PostNotificationTest.php +++ b/mailpoet/tests/integration/Newsletter/Scheduler/PostNotificationTest.php @@ -165,7 +165,7 @@ class PostNotificationTest extends \MailPoetTest { $this->postNotificationScheduler->schedulePostNotification(10); $currentTime = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp')); Carbon::setTestNow($currentTime); // mock carbon to return current time - $nextRunDate = ($currentTime->hour < 5) ? + $nextRunDate = ($currentTime->hour < 5) || ($currentTime->hour === 5 && $currentTime->minute < 45) ? $currentTime : $currentTime->addDay(); $queue = $this->sendingQueuesRepository->findOneBy(['newsletter' => $newsletter]);