mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Added shorter timeout to fsockopen checks
This commit is contained in:
parent
8a7e2609cd
commit
b3f55bfd29
1 changed files with 7 additions and 7 deletions
|
@ -268,7 +268,7 @@ class EmailComponentTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSmtpConfig() {
|
function testSmtpConfig() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->Controller->EmailTest->delivery = 'smtp';
|
$this->Controller->EmailTest->delivery = 'smtp';
|
||||||
|
@ -295,7 +295,7 @@ class EmailComponentTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testBadSmtpSend() {
|
function testBadSmtpSend() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->Controller->EmailTest->smtpOptions['host'] = 'blah';
|
$this->Controller->EmailTest->smtpOptions['host'] = 'blah';
|
||||||
|
@ -310,7 +310,7 @@ class EmailComponentTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSmtpSend() {
|
function testSmtpSend() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ TEMPDOC;
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSmtpEhlo() {
|
function testSmtpEhlo() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ TEMPDOC;
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSmtpSendMultipleTo() {
|
function testSmtpSendMultipleTo() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->Controller->EmailTest->reset();
|
$this->Controller->EmailTest->reset();
|
||||||
|
@ -465,7 +465,7 @@ TEMPDOC;
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testAuthenticatedSmtpSend() {
|
function testAuthenticatedSmtpSend() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ TEXTBLOC;
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testSmtpSendSocket() {
|
function testSmtpSendSocket() {
|
||||||
if ($this->skipIf(!@fsockopen('localhost', 25), '%s No SMTP server running on localhost')) {
|
if ($this->skipIf(!@fsockopen('localhost', 25, $err, $errstr, .01), '%s No SMTP server running on localhost')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue