Fixed test that use genreated mail to see information.

This commit is contained in:
Marco Vito Moscaritolo 2015-02-06 19:09:37 +01:00 committed by Tobias van Beek
commit 9cc7a0477a

View file

@ -209,6 +209,45 @@ class EmailTest extends \PHPUnit_Framework_TestCase
$this->assertContains('default-mailto-address@example.com', $this->message['to']);
}
/**
* @covers PHPUnit::execute
*/
public function testExecute_UniqueRecipientsFromWithCommitter()
{
$this->loadEmailPluginWithOptions(
array(
'addresses' => array('test-receiver@example.com', 'test-receiver2@example.com')
)
);
$returnValue = $this->testedEmailPlugin->execute();
$this->assertTrue($returnValue);
$this->assertCount(2, $this->message['to']);
$this->assertContains('test-receiver@example.com', $this->message['to']);
$this->assertContains('test-receiver2@example.com', $this->message['to']);
}
/**
* @covers PHPUnit::execute
*/
public function testExecute_UniqueRecipientsWithCommiter()
{
$this->loadEmailPluginWithOptions(
array(
'commiter' => true,
'addresses' => array('test-receiver@example.com', 'committer@test.com')
)
);
$returnValue = $this->testedEmailPlugin->execute();
$this->assertTrue($returnValue);
$this->assertContains('test-receiver@example.com', $this->message['to']);
$this->assertContains('committer@test.com', $this->message['to']);
}
/**
* @covers PHPUnit::execute
*/