Writing a PHPUnit test for Symfony2 to test email sending
We generate a fake unique content and loop through all sent emails to verify that is was sent.
Note that this does not actually test if the email is sent to the server but merely tells you if Symfony is trying to send it.
Inspiration: http://docs.behat.org/cookbook/using_the_profiler_with_minkbundle.html