Merge pull request #7344 from creative-commoners/pulls/4.0/email-assertion-return

DOCS Update doc block for TestMailer::findEmail to reflect the new key names
This commit is contained in:
Damian Mooyman 2017-09-08 13:08:03 +12:00 committed by GitHub
commit 22e991ef90
2 changed files with 5 additions and 5 deletions

View File

@ -537,8 +537,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase implements TestOnly
* @param string $from
* @param string $subject
* @param string $content
* @return array Contains keys: 'type', 'to', 'from', 'subject','content', 'plainContent', 'attachedFiles',
* 'customHeaders', 'htmlContent', 'inlineImages'
* @return array|null Contains keys: 'Type', 'To', 'From', 'Subject', 'Content', 'PlainContent', 'AttachedFiles',
* 'HtmlContent'
*/
public function findEmail($to, $from = null, $subject = null, $content = null)
{

View File

@ -88,8 +88,8 @@ class TestMailer implements Mailer
* @param string $from
* @param string $subject
* @param string $content
* @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles',
* 'customHeaders', 'htmlContent', 'inlineImages'
* @return array|null Contains keys: 'Type', 'To', 'From', 'Subject', 'Content', 'PlainContent', 'AttachedFiles',
* 'HtmlContent'
*/
public function findEmail($to, $from = null, $subject = null, $content = null)
{
@ -103,7 +103,7 @@ class TestMailer implements Mailer
foreach ($this->emailsSent as $email) {
$matched = true;
foreach (array('To','From','Subject','Content') as $field) {
foreach (array('To', 'From', 'Subject', 'Content') as $field) {
if ($value = $compare[$field]) {
if ($value[0] == '/') {
$matched = preg_match($value, $email[$field]);