Skip to content

Commit 63b2b32

Browse files
committed
minor #17727 [Mailer] update mailer testing documentation (MrYamous)
This PR was merged into the 5.4 branch. Discussion ---------- [Mailer] update mailer testing documentation Comparable as #17719 to make MailerAssertionsTrait more visible And minor update for example Commits ------- 96ff886 update mailer testing documentation
2 parents fee323e + 96ff886 commit 63b2b32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mailer.rst

Lines 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)