Skip to content

Commit

Permalink
Revert "Fixed failing smtp tests when testing on host other then hard…
Browse files Browse the repository at this point in the history
…coded 'localhost'."

This change you cause the tests to fail when run through CLI

This reverts commit f361509.
  • Loading branch information
ADmad committed Oct 19, 2011
1 parent 6177203 commit 6d51ce5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php
Expand Up @@ -100,7 +100,7 @@ public function testConnectEhlo() {
$this->socket->expects($this->any())->method('connect')->will($this->returnValue(true));
$this->socket->expects($this->at(0))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(1))->method('read')->will($this->returnValue("220 Welcome message\r\n"));
$this->socket->expects($this->at(2))->method('write')->with("EHLO " . env('HTTP_HOST') . "\r\n");
$this->socket->expects($this->at(2))->method('write')->with("EHLO localhost\r\n");
$this->socket->expects($this->at(3))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(4))->method('read')->will($this->returnValue("250 Accepted\r\n"));
$this->SmtpTransport->connect();
Expand All @@ -115,10 +115,10 @@ public function testConnectHelo() {
$this->socket->expects($this->any())->method('connect')->will($this->returnValue(true));
$this->socket->expects($this->at(0))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(1))->method('read')->will($this->returnValue("220 Welcome message\r\n"));
$this->socket->expects($this->at(2))->method('write')->with("EHLO " . env('HTTP_HOST') . "\r\n");
$this->socket->expects($this->at(2))->method('write')->with("EHLO localhost\r\n");
$this->socket->expects($this->at(3))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(4))->method('read')->will($this->returnValue("200 Not Accepted\r\n"));
$this->socket->expects($this->at(5))->method('write')->with("HELO " . env('HTTP_HOST') . "\r\n");
$this->socket->expects($this->at(5))->method('write')->with("HELO localhost\r\n");
$this->socket->expects($this->at(6))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(7))->method('read')->will($this->returnValue("250 Accepted\r\n"));
$this->SmtpTransport->connect();
Expand All @@ -134,10 +134,10 @@ public function testConnectFail() {
$this->socket->expects($this->any())->method('connect')->will($this->returnValue(true));
$this->socket->expects($this->at(0))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(1))->method('read')->will($this->returnValue("220 Welcome message\r\n"));
$this->socket->expects($this->at(2))->method('write')->with("EHLO " . env('HTTP_HOST') . "\r\n");
$this->socket->expects($this->at(2))->method('write')->with("EHLO localhost\r\n");
$this->socket->expects($this->at(3))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(4))->method('read')->will($this->returnValue("200 Not Accepted\r\n"));
$this->socket->expects($this->at(5))->method('write')->with("HELO " . env('HTTP_HOST') . "\r\n");
$this->socket->expects($this->at(5))->method('write')->with("HELO localhost\r\n");
$this->socket->expects($this->at(6))->method('read')->will($this->returnValue(false));
$this->socket->expects($this->at(7))->method('read')->will($this->returnValue("200 Not Accepted\r\n"));
$this->SmtpTransport->connect();
Expand Down Expand Up @@ -259,4 +259,4 @@ public function testQuit() {
$this->SmtpTransport->disconnect();
}

}
}

0 comments on commit 6d51ce5

Please sign in to comment.