mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #229 from creative-commoners/pulls/5/testmailer-signature
API Update method signatures
This commit is contained in:
commit
1786ce115d
@ -25,7 +25,7 @@ class TestMailer extends BaseTestMailer
|
||||
/**
|
||||
* Clear the log of emails sent
|
||||
*/
|
||||
public function clearEmails()
|
||||
public function clearEmails(): void
|
||||
{
|
||||
$state = $this->testSessionEnvironment->getState();
|
||||
if (isset($state->emails)) {
|
||||
@ -34,8 +34,12 @@ class TestMailer extends BaseTestMailer
|
||||
$this->testSessionEnvironment->applyState($state);
|
||||
}
|
||||
|
||||
public function findEmail($to = null, $from = null, $subject = null, $content = null)
|
||||
{
|
||||
public function findEmail(
|
||||
string $to,
|
||||
?string $from = null,
|
||||
?string $subject = null,
|
||||
?string $content = null
|
||||
): ?array {
|
||||
$matches = $this->findEmails($to, $from, $subject, $content);
|
||||
//got the count of matches emails
|
||||
$emailCount = count($matches ?? []);
|
||||
|
Loading…
Reference in New Issue
Block a user