mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4088 from AntonyThorpe/patch-3
Update 03_Testing_Email.md
This commit is contained in:
commit
4fe4d17eaf
@ -15,10 +15,10 @@ email was sent using this method.
|
|||||||
$e->send();
|
$e->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
To test that `MyMethod` sends the correct email, use the [api:Email::assertEmailSent] method.
|
To test that `MyMethod` sends the correct email, use the [api:SapphireTest::assertEmailSent] method.
|
||||||
|
|
||||||
:::php
|
:::php
|
||||||
$this->assertEmailSend($to, $from, $subject, $body);
|
$this->assertEmailSent($to, $from, $subject, $body);
|
||||||
|
|
||||||
// to assert that the email is sent to the correct person
|
// to assert that the email is sent to the correct person
|
||||||
$this->assertEmailSent("someone@example.com", null, "/th.*e$/");
|
$this->assertEmailSent("someone@example.com", null, "/th.*e$/");
|
||||||
|
Loading…
Reference in New Issue
Block a user