Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 96ff886

Browse filesBrowse files
committed
update mailer testing documentation
1 parent 3062a15 commit 96ff886
Copy full SHA for 96ff886

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎mailer.rst

Copy file name to clipboardExpand all lines: mailer.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,21 +1534,21 @@ Write a Functional Test
15341534
~~~~~~~~~~~~~~~~~~~~~~~
15351535

15361536
To functionally test that an email was sent, and even assert the email content or headers,
1537-
you can use the built in assertions::
1537+
you can use the built in assertions provided by :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait`.
1538+
1539+
See :ref:`testing documentation <mailer-assertions>` for the list of available assertions.::
15381540

15391541
// tests/Controller/MailControllerTest.php
15401542
namespace App\Tests\Controller;
15411543

1542-
use Symfony\Bundle\FrameworkBundle\Test\MailerAssertionsTrait;
15431544
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
15441545

15451546
class MailControllerTest extends WebTestCase
15461547
{
1547-
use MailerAssertionsTrait;
15481548

15491549
public function testMailIsSentAndContentIsOk()
15501550
{
1551-
$client = $this->createClient();
1551+
$client = static::createClient();
15521552
$client->request('GET', '/mail/send');
15531553
$this->assertResponseIsSuccessful();
15541554

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.