Skip to content

Commit 2255767

Browse files
mavimoTobias van Beek
authored and
Tobias van Beek
committed
Fixed test that use genreated mail to see information.
1 parent cbd98b6 commit 2255767

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Tests/PHPCI/Plugin/EmailTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,45 @@ public function testBuildsDefaultEmails()
209209
$this->assertContains('[email protected]', $this->message['to']);
210210
}
211211

212+
/**
213+
* @covers PHPUnit::execute
214+
*/
215+
public function testExecute_UniqueRecipientsFromWithCommitter()
216+
{
217+
$this->loadEmailPluginWithOptions(
218+
array(
219+
'addresses' => array('[email protected]', '[email protected]')
220+
)
221+
);
222+
223+
$returnValue = $this->testedEmailPlugin->execute();
224+
$this->assertTrue($returnValue);
225+
226+
$this->assertCount(2, $this->message['to']);
227+
228+
$this->assertContains('[email protected]', $this->message['to']);
229+
$this->assertContains('[email protected]', $this->message['to']);
230+
}
231+
232+
/**
233+
* @covers PHPUnit::execute
234+
*/
235+
public function testExecute_UniqueRecipientsWithCommiter()
236+
{
237+
$this->loadEmailPluginWithOptions(
238+
array(
239+
'commiter' => true,
240+
'addresses' => array('[email protected]', '[email protected]')
241+
)
242+
);
243+
244+
$returnValue = $this->testedEmailPlugin->execute();
245+
$this->assertTrue($returnValue);
246+
247+
$this->assertContains('[email protected]', $this->message['to']);
248+
$this->assertContains('[email protected]', $this->message['to']);
249+
}
250+
212251
/**
213252
* @covers PHPUnit::execute
214253
*/

0 commit comments

Comments
 (0)