Skip to content

Commit

Permalink
consistency, replace "e-mail" with "email"
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed May 1, 2015
1 parent 387ebc0 commit 5b8e84d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 5b8e84d

Please sign in to comment.