MailChimp
Magium offers a library for helping you ensure that with whichever action you are testing the expected email address is being added to the proper mailing list.
Getting started with magium/mailchimp is very easy.
composer require magium/mailchimp
Then in your test assert that the email address is either subscribed or not subscribed, depending on the action.
class AssertSubscriberTest extends AbstractTestCase { public function testIsSubscribedTest() { $assertion = $this->getAssertion(Subscribed::ASSERTION); $assertion->setEmail('[email protected]'); $assertion->setList('Magium'); $assertion->assert(); } }