File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1533,10 +1533,11 @@ a specific address, instead of the *real* address:
15331533 Write a Functional Test
15341534~~~~~~~~~~~~~~~~~~~~~~~
15351535
1536- To functionally test that an email was sent, and even assert the email content or headers,
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.::
1536+ Symfony provides lots of :ref: `built-in mailer assertions <mailer-assertions >`
1537+ to functionally test that an email was sent, its contents or headers, etc.
1538+ They are available in test classes extending
1539+ :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ KernelTestCase ` or when using
1540+ the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Test\\ MailerAssertionsTrait `::
15401541
15411542 // tests/Controller/MailControllerTest.php
15421543 namespace App\Tests\Controller;
@@ -1545,7 +1546,6 @@ See :ref:`testing documentation <mailer-assertions>` for the list of available a
15451546
15461547 class MailControllerTest extends WebTestCase
15471548 {
1548-
15491549 public function testMailIsSentAndContentIsOk()
15501550 {
15511551 $client = static::createClient();
Original file line number Diff line number Diff line change @@ -1061,6 +1061,8 @@ Crawler Assertions
10611061 ``assertFormValue() `` and ``assertNoFormValue() `` methods were introduced
10621062 in Symfony 5.2.
10631063
1064+ .. _mailer-assertions :
1065+
10641066Mailer Assertions
10651067.................
10661068
You can’t perform that action at this time.
0 commit comments