update email tests now that cc can be specified.
This commit is contained in:
parent
2b93fe0c94
commit
06625513d2
2 changed files with 7 additions and 6 deletions
|
|
@ -106,9 +106,10 @@ class Email implements \PHPCI\Plugin
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array|string $toAddresses Array or single address to send to
|
||||
* @param string $subject Email subject
|
||||
* @param string $body Email body
|
||||
* @param string[]|string $toAddresses Array or single address to send to
|
||||
* @param string[] $ccList
|
||||
* @param string $subject Email subject
|
||||
* @param string $body Email body
|
||||
* @return array Array of failed addresses
|
||||
*/
|
||||
public function sendEmail($toAddresses, $ccList, $subject, $body)
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$this->mockMailer->expects($this->once())
|
||||
->method('send');
|
||||
$this->testedEmailPlugin->sendEmail("test@email.com", "hello", "body");
|
||||
$this->testedEmailPlugin->sendEmail("test@email.com", array(), "hello", "body");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -177,7 +177,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
$this->mockMailer->expects($this->once())
|
||||
->method('send')
|
||||
->with($this->isInstanceOf('\Swift_Message'), $this->anything());
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, $subject, $body);
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, array(), $subject, $body);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -197,7 +197,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
$actualMail = null;
|
||||
$this->catchMailPassedToSend($actualMail);
|
||||
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, $subject, $body);
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, array(), $subject, $body);
|
||||
|
||||
$this->assertSystemMail(
|
||||
$toAddress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue