Skip to content

consistent spelling #4671

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 16 commits into from
May 22, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
consistency, replace "e-mail" with "email"
  • Loading branch information
xabbuh committed May 1, 2015
commit 5b8e84d3f9e9e35c41570f99eb9c6988c9e5eb1d
10 changes: 5 additions & 5 deletions cookbook/email/testing.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.. index::
single: Emails; Testing

How to Test that an Email is Sent in a functional Test
How to Test that an Email is Sent in a Functional Test
======================================================

Sending e-mails with Symfony is pretty straightforward thanks to the
Sending emails with Symfony is pretty straightforward thanks to the
SwiftmailerBundle, which leverages the power of the `Swift Mailer`_ library.

To functionally test that an email was sent, and even assert the email subject,
content or any other headers, you can use :ref:`the Symfony Profiler <internals-profiler>`.

Start with an easy controller action that sends an e-mail::
Start with an easy controller action that sends an email::

public function sendEmailAction($name)
{
Expand Down Expand Up @@ -49,13 +49,13 @@ to get information about the messages send on the previous request::

$mailCollector = $client->getProfile()->getCollector('swiftmailer');

// Check that an e-mail was sent
// Check that an email was sent
$this->assertEquals(1, $mailCollector->getMessageCount());

$collectedMessages = $mailCollector->getMessages();
$message = $collectedMessages[0];

// Asserting e-mail data
// Asserting email data
$this->assertInstanceOf('Swift_Message', $message);
$this->assertEquals('Hello Email', $message->getSubject());
$this->assertEquals('send@example.com', key($message->getFrom()));
Expand Down
2 changes: 1 addition & 1 deletion cookbook/web_services/php_soap_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ In this case, the SOAP service will allow the client to call a method called
}

Next, you can train Symfony to be able to create an instance of this class.
Since the class sends an e-mail, it's been designed to accept a ``Swift_Mailer``
Since the class sends an email, it's been designed to accept a ``Swift_Mailer``
instance. Using the Service Container, you can configure Symfony to construct
a ``HelloService`` object properly:

Expand Down