Skip to content

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

Merged
merged 1 commit into from
Feb 3, 2013

Conversation

ricardclau
Copy link
Contributor

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets #1210

As always, waiting for your comments and improvements on this!

``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>`.
Copy link
Member

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>`.

@ricardclau
Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed!

weaverryan added a commit that referenced this pull request Feb 3, 2013
Add cookbook for e-mail testing with Symfony2 profiler
@weaverryan weaverryan merged commit ba88629 into symfony:2.0 Feb 3, 2013
@weaverryan
Copy link
Member

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!

@ricardclau
Copy link
Contributor Author

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!

@ricardclau ricardclau deleted the testing_mails_profiler branch February 3, 2013 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants