This commit removes the main MP2 migration class and its test class. It
also removes two SQL files that were used in the test class. One of
those files executed the following query:
`SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"`
Removing this query made the tests inside SubscriberSegmentTest fail
when running the whole integration test suite. To work around this, I
added the above mentioned query to SubscriberSegmentTest. I'm not sure
why this test class fails without this query when running all the tests
but it doesn't when it is executed alone. Probably there is another test
class changing the SQL_MODE. Since SubscriberSegmentTest is a test class
for a Paris model that we will eventually remove, I decided it was not
necessary to investigate this further.
[MAILPOET-4376]
- Rename validator to newsletterValidator for clarity
- Add validation for ALC content
- Refactor tests to use data factory for consistency and to avoid
validation issues
- Add separate tests for NewsletterValidator service
- Add test helper for retrieving service with private properties
overridden by name
[MAILPOET-4236]
Having separate objects for validation results is unnecessary and overly
complicated at this point, and we should wait to introduce that kind of
complexity only when/if it's clearly needed.
[MAILPOET-4191]
Segment and Subscriber subjects can be stateful, with specific segments
and subscribers loaded into them, so we should probably get separate
instances of them instead of sharing that state and potentially getting
unexpected behavior.
[MAILPOET-4191]
We can't create mailer directly in DI container using the factory because it may fail in case
the plugin is not configured properly and prevent plugin from start.
The Mailer was previously injected because it contains lazy initialization.
The lazy initialization in the singleton Mailer service was dangerous,
because when used with some custom parameters it could cause that all services
that inject the Mailer from DI would use the custom config instead the default.
[MAILPOET-4115]
In this commit I copied and slightly modified functionality used
for creating Mailer instance based on config from the Mailer to an extra class.
The functionality still remains also in Mailer and will be removed later.
I also created test based on the original test for Mailer and added test case
testing it creates specific MailerMethods.
[MAILPOET-4115]