Take into account that the newsletter is scheduled at 5:45 and not 5:00
[MAILPOET-5528]
This commit is contained in:
@ -165,7 +165,7 @@ class PostNotificationTest extends \MailPoetTest {
|
|||||||
$this->postNotificationScheduler->schedulePostNotification(10);
|
$this->postNotificationScheduler->schedulePostNotification(10);
|
||||||
$currentTime = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
|
$currentTime = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
|
||||||
Carbon::setTestNow($currentTime); // mock carbon to return current time
|
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 :
|
||||||
$currentTime->addDay();
|
$currentTime->addDay();
|
||||||
$queue = $this->sendingQueuesRepository->findOneBy(['newsletter' => $newsletter]);
|
$queue = $this->sendingQueuesRepository->findOneBy(['newsletter' => $newsletter]);
|
||||||
|
Reference in New Issue
Block a user