Commit Graph

18 Commits

Author SHA1 Message Date
Rodrigo Primo
eb8351f964 Replace verify()->equals() with verify->equalsWithDelta()
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]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
fa9236d8c9 Replace expect()->greaterThan() with verify()->greaterThan()
codeception/verify 2.1 removed support for expect()->greaterThan() so we need
to replace it with verify()->greaterThan().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
0d2f6e0776 Replace expect()->stringContainsString() with verify()->stringContainsString()
codeception/verify 2.1 removed support for expect()->stringContainsString() so we need
to replace it with verify()->stringContainsString().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
709be1d541 Replace expect()->null() with verify()->null()
codeception/verify 2.1 removed support for expect()->null() so we need
to replace it with verify()->null().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
997f635d4a Replace expect()->false() with verify()->false()
codeception/verify 2.1 removed support for expect()->false() so we need
to replace it with verify()->false().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
9adbf81a78 Replace expect()->true() with verify()->true()
codeception/verify 2.1 removed support for expect()->true() so we need
to replace it with verify()->true().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
afe378ba22 Replace expect()->equals() with verify()->equals()
codeception/verify 2.1 removed support for expect()->equals() so we need
to replace it with verify()->equals().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
John Oleksowicz
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
Rostislav Wolny
522b8a87db Fix flaky MailerLog testItTruncatesOutdatedEntriesWhenIncrementingSentCount
The test was setting the value that was later checked to the very edge of the allowed interval.
So if the tested method was executed a second later test failed.
This commit sets the tested value a second before the end or the interval so
there should be enough time for the method to run with the expected outcome.
[MAILPOET-4866]
2023-01-30 09:32:31 +02:00
Rostislav Wolny
0bbdf4b47f Add error log when pausing sending due an error
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
Rostislav Wolny
e13113e38b Fix condition for pausing sending when confirmation emails fail
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
Rostislav Wolny
11beebf74d Add MailerLog method for handling transactional emails errors
The new method allows processing sending errors that happen when sending from other places of plugin
then from the Sending Queue worker.
After three failed attempts it pauses the sending and admin user will see an notice.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
2d21489c44 Always reset MailerLog error on increment send count
Recently we've stopped incrementing sending counter when site configured to use MSS.
This caused that also code reseting the sending error was skipped.
This commit changes incrementSentCount method so that it always clears error log.
[MAILPOET-4448]
2022-06-20 14:17:54 +02:00
David Remer
ec7fe4161f Do not increment counter when sending method is MSS
[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
David Remer
ac52f2af99 Introduce phpstan-type for MailerLog data
[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
David Remer
53da8bf999 Change data model to calculate sending limit reached
Before this commit, we used to calculate whether the sending limit was reached
by simply counting, how many emails where sent and when we did send them the
last time. In case the last time we did send was before the sending frequency,
and we reached the limit we would reset the calculation.

This led to the following problem:

In case we had e.g. one email send at an outdated timestamp, we would first fill
the outdated timestamp and once we reached the limit, we would reset the counter
and start with the current timestamp. So it followed, we would send more emails
than the limit would allow for.

[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00