Created
January 23, 2015 14:46
-
-
Save SebSept/25bc5523f5611020767a to your computer and use it in GitHub Desktop.
blog_debug_mails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testEnvoi_destinataires_du_mail() | |
{ | |
$this->assertUsePhpMail(); | |
$this->assertTrue($this->module->envoiMail()); | |
$mail = json_decode(file_get_contents('/tmp/lastmail')); | |
$destinataires = $mail->bcc; | |
// -- verif que plus de 5 destinataires :le listing principal | |
$this->assertTrue(count($destinataires) > 50); | |
// -- verif que je suis bien dans les destinataires | |
$moi_present = false; | |
foreach ($destinataires as $destinataire) | |
{ | |
$moi_present = 'sebastien***@yahoo.fr' === $destinataire->address; | |
if ($moi_present) | |
{ | |
break; | |
} | |
} | |
$this->assertTrue($moi_present); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment