-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add cookbook for e-mail testing with Symfony2 profiler #2201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
``SwiftmailerBundle``, which leverages the power of the `Swiftmailer`_ library. | ||
|
||
To functionally test that e-mails are sent, and even assert their subjects, | ||
content or any other headers we can use the Symfony2 :ref:`Profiler <internals-profiler>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to do it like this:
... we can use :ref:`the Symfony2 Profiler <internals-profiler>`.
Fixed @wouterj comments, waiting for comments on a better sentence to introduce Functional Test |
And the ``WebTestCase`` to assert the e-mail content should be similar to:: | ||
|
||
// src/Acme/DemoBundle/Tests/Controller/MailControllerTest.php | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should remove this empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed!
Add cookbook for e-mail testing with Symfony2 profiler
Awesome work Ricard - thanks very much for this! I made minor tweaks at sha: f60eac8 - let me know if you see anything you don't like! Thanks! |
Thanks for fixing my "not so good" (to say the least) English :) And regarding the change to POST in the functional test, I agree with the change, 99,99999% of the times such an action will be POST and not GET :) Thanks for merging, always glad to contribute! |
As always, waiting for your comments and improvements on this!