Commit Graph

41 Commits

Author SHA1 Message Date
Rodrigo Primo
7a82270769 Add types to verifyWPSubscriber() based on PR reviewer feedback
[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
bb2c77de31 Simplify verifyMailpoetSubscriber() by setting types in the signature
[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
06a2c4e2bc Refactor Scheduler to use SubscriberEntity instead of Subscriber model
It was necessary to add a call to SubscribersRepository::remove() to two
integration tests to make sure Doctrine cleared its internal cache.
Maybe this should be handled by SubscribersRepository::bulkDelete().

[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
b251fa8ee9 Replace SubscribeSegment model with Doctrine code in Scheduler
[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
3b46668784 Refactor processScheduledStandardNewsletter() to use Doctrine
[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
ca3b5032ca Replace Newsletter model with NewsletterEntity in SchedulerTest
Temporary code was added to Scheduler to make some of its methods work
both with a Newsletter model and a NewsletterEntity.

[MAILPOET-4370]
2023-05-30 13:12:29 +02:00
Rodrigo Primo
1a036b8772 Use constants from NewsletterEntity instead of Newsletter model in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
fb9cfe24ce Replace ScheduledTask model with ScheduledTaskEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
7001b18858 Replace ScheduledTaskSubscribe model with ScheduledTaskSubscriberEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
54b135d9c1 Replace NewsletterSegment model with NewsletterSegmentEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
c3cb29c195 Replace SendingQueue model with SendingQueueEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
51fe832592 Replace Segment model with SegmentEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
661690cc10 Replace Subscriber model with SubscriberEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Rodrigo Primo
7e49ef3001 Replace SubscriberSegment model with SubscriberSegmentEntity in SchedulerTest
[MAILPOET-4370]
2023-05-18 14:48:02 -03:00
Jan Jakes
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
David Remer
9afe052b2a Test transactional emails get scheduled
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
Jan Jakes
b296e40077 Extract Carbon datetime reset to test bootstrap
MAILPOET-5145
2023-04-07 12:11:12 -05:00
Jan Jakes
70e6447e28 Extract WPFunctions reset to test bootstrap
MAILPOET-5145
2023-04-07 12:11:12 -05:00
John Oleksowicz
cd0b795ac8 Extract customer creation/cleanup
This also ensures that cleanup always runs after all integration tests

MAILPOET-5145
2023-04-07 12:11:12 -05:00
John Oleksowicz
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
Jan Lysý
26a85458a5 Remove usage Sending::createFromQueue from Scheduler test
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
David Remer
4577ca5476 Fix tests
[MAILPOET-3982]
2022-12-06 14:17:49 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
David Remer
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
Rostislav Wolny
146a55b921 Improve stability of SchedulerTest by adding 1s delta to time comparisons
[MAILPOET-4780]
2022-11-07 19:15:43 +01:00
Rostislav Wolny
918a4d7c74 Refresh the sending queue entity when fetching it from the old model
By moving the refresh code into the method used for getting sending queue entity for the old model object
we want to make our code better protected from working with inconsistent sending queue data.
[MAILPOET-4750]
2022-10-27 12:08:31 +02:00
David Remer
bb04935f29 Add repository to testee
[MAILPOET-4708]
2022-10-10 17:13:17 +02:00
Jan Lysý
0551d02815 Add refreshing sending queue
Because we are still working with old model on some places, it's necessary to refresh both sides of the relation.
[MAILPOET-4685]
2022-09-29 15:19:09 -03:00
Jan Lysý
97801cfe25 Remove usage of Sending::getScheduledQueues
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
Jan Jakes
047bd94d98 Implement sending for automation emails
[PREMIUM-194]
2022-09-08 09:20:20 +02:00
Jan Lysý
fecb26b3b5 Replace usage ScheduledTask::touchAllByIds with repository
[MAILPOET-4309]
2022-08-31 13:42:21 +02:00
Jan Lysý
5f88a27ccb Extend integration test
[MAILPOET-4310]
2022-08-22 11:04:45 +02:00
Jan Lysý
bfc2a7d2af Update dependencies in tests
[MAILPOET-4310]
2022-08-22 11:04:45 +02:00
Rodrigo Primo
3684530056 Replace NewsletterOption and NewsletterOptionField models
This commit repleaces the old NewsletterOption and NewsletterOptionField
models with Doctrine code in several test classes.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
David Remer
fce14358bf Revert "Replace NewsletterOption and NewsletterOptionField models"
This reverts commit 9b087f719f.
2022-05-17 12:27:46 +02:00
Rodrigo Primo
d89067854c Replace NewsletterOption and NewsletterOptionField models
This commit repleaces the old NewsletterOption and NewsletterOptionField
models with Doctrine code in several test classes.

[MAILPOET-4150]
2022-05-16 13:18:21 +02:00
David Remer
ca3f8bdc43 Make Scheduler non-static
[MAILPOET-4252]
2022-04-25 12:08:18 +02:00
Rodrigo Primo
0a73135c83 Replace old Segment model with Doctrine in SubscribersFinder
[MAILPOET-3925]
2022-03-28 08:13:53 +02:00
Brezo Cordero
0d4f14eb1e Use empty string instead of null
Fixes PHPStan error.

[MAILPOET-4131]
2022-03-07 16:07:16 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00