We don't need to use the value from `processedAt` here since we can rightfully use the current datetime value
Also, I found out `processedAt` is usually null here for standard newsletters which cause new Carbon to use the server datetime settings
MAILPOET-5795
As far as I could test, calling validate() directly is not necessary.
The call to $sendingTask->save() right above calls validate() internaly
and then any errors will be returned by $sendingTask->getErrors().
I added a integration test that seems to confirm this interpretation.
[MAILPOET-4693]
The second parameter of expect()->equals() could be a integer and in
this case it would be used as a delta when comparing the values.
verify()->equals() does not accept that and verify()->equalsWithDelta()
should be used.
[MAILPOET-5664]
codeception/verify 2.1 removed support for expect()->stringNotContainsString() so we need
to replace it with verify()->stringNotContainsString().
[MAILPOET-5664]
codeception/verify 2.1 removed support for expect()->stringContainsString() so we need
to replace it with verify()->stringContainsString().
[MAILPOET-5664]
When comparing the sentAt and processedAt dates there might be one second difference.
This may happen also in the application, because they are updated by separate queries.
This commit fixes the flakiness by comparing timestamps with delta 1 second instead of comparing date time strings.
[MAILPOET-4710]
This commit deprecates the filter
mailpoet_sending_newsletter_render_after and replaces it with
mailpoet_sending_newsletter_render_after_pre_process. This was necessary
because as part of a Doctrine refactor one of the parameters passed to
the old filter changed from a Newsletter model to a Newsletter entity.
[MAILPOET-4680]
Doing this for consistency and to make it more clear that $sendingTask
contains an instance of \MailPoet\Tasks\Sending and not an instance of
\MailPoet\Models\SendingQueue.
[MAILPOET-4363]
Doing this for consistency and to better makr that this property
contains an instance of \MailPoet\Tasks\Sending and not an instance
of \MailPoet\Models\SendingQueue.
[MAILPOET-4363]