avoid failing tests by 1 second diff

This commit is contained in:
Ceeram 2012-02-10 19:53:04 +01:00
parent f8fef907c8
commit 7e5ef1dc0d
2 changed files with 6 additions and 2 deletions

View file

@ -49,13 +49,15 @@ class DebugTransportTest extends CakeTestCase {
$email->bcc('phpnut@cakephp.org');
$email->messageID('<4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>');
$email->subject('Testing Message');
$date = date(DATE_RFC2822);
$email->setHeaders(array('X-Mailer' => $email::EMAIL_CLIENT, 'Date' => $date));
$email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', '')));
$headers = "From: CakePHP Test <noreply@cakephp.org>\r\n";
$headers .= "To: CakePHP <cake@cakephp.org>\r\n";
$headers .= "Cc: Mark Story <mark@cakephp.org>, Juan Basso <juan@cakephp.org>\r\n";
$headers .= "X-Mailer: CakePHP Email\r\n";
$headers .= "Date: " . date(DATE_RFC2822) . "\r\n";
$headers .= "Date: " . $date . "\r\n";
$headers .= "Message-ID: <4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>\r\n";
$headers .= "Subject: Testing Message\r\n";
$headers .= "MIME-Version: 1.0\r\n";

View file

@ -220,6 +220,8 @@ class SmtpTransportTest extends CakeTestCase {
$email->bcc('phpnut@cakephp.org');
$email->messageID('<4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>');
$email->subject('Testing SMTP');
$date = date(DATE_RFC2822);
$email->setHeaders(array('X-Mailer' => $email::EMAIL_CLIENT, 'Date' => $date));
$email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', '')));
$data = "From: CakePHP Test <noreply@cakephp.org>\r\n";
@ -227,7 +229,7 @@ class SmtpTransportTest extends CakeTestCase {
$data .= "To: CakePHP <cake@cakephp.org>\r\n";
$data .= "Cc: Mark Story <mark@cakephp.org>, Juan Basso <juan@cakephp.org>\r\n";
$data .= "X-Mailer: CakePHP Email\r\n";
$data .= "Date: " . date(DATE_RFC2822) . "\r\n";
$data .= "Date: " . $date . "\r\n";
$data .= "Message-ID: <4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>\r\n";
$data .= "Subject: Testing SMTP\r\n";
$data .= "MIME-Version: 1.0\r\n";