Skip to content
Closed
Changes from all commits
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
7 changes: 4 additions & 3 deletions src/Codeception/Module/Symfony/MailerAssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function seeEmailIsSent(int $expectedCount = 1): void

/**
* Returns the last sent email.
* See also: [grabSentEmails()](https://codeception.com/docs/modules/Symfony#grabSentEmails)
*
* ```php
* <?php
Expand All @@ -61,12 +62,12 @@ public function grabLastSentEmail(): ?Email

/**
* Returns an array of all sent emails.
* See also: [grabLastSentEmail()](https://codeception.com/docs/modules/Symfony#grabLastSentEmail).
*
* ```php
* <?php
* /** @var array<int, \Symfony\Component\Mime\Email> $emails {@*}
* $emails = $I->grabSentEmails();
* $address = $emails[0]->getTo()[0];
* $I->assertSame('[email protected]', $address->getAddress());
* ```
*
* @return \Symfony\Component\Mime\Email[]
Expand All @@ -90,4 +91,4 @@ protected function getMessageMailerEvents(): MessageEvents

$this->fail("Emails can't be tested without Symfony Mailer service.");
}
}
}