Skip to content

Commit

Permalink
avoid failing tests by 1 second diff
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Feb 10, 2012
1 parent f8fef90 commit 7e5ef1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/Cake/Test/Case/Network/Email/DebugTransportTest.php
Expand Up @@ -49,13 +49,15 @@ public function testSend() {
$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";
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php
Expand Up @@ -220,14 +220,16 @@ public function testSendData() {
$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";
$data .= "Return-Path: CakePHP Return <pleasereply@cakephp.org>\r\n";
$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";
Expand Down

0 comments on commit 7e5ef1d

Please sign in to comment.