Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fixed test to handle properly error strings from newer Net_SMTP pac…

…kage versions

git-svn-id: http://svn.php.net/repository/pear/packages/Mail/trunk@307485 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 28f9797d883730e07e8b3b98975daf793591a71d 1 parent 1204fc1
Aleksander Machniak authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tests/smtp_error.phpt
View
7 tests/smtp_error.phpt
@@ -20,8 +20,11 @@ $mailer = &Mail::factory('smtp', $params);
/* Attempt to send an empty message in order to trigger an error. */
$e = $mailer->send(array(), array(), '');
if (is_a($e, 'PEAR_Error')) {
- die($e->getMessage() . "\n");
+ $err = $e->getMessage();
+ if (preg_match('/Failed to connect to bogus.host.tld:25 \[SMTP: Failed to connect socket:.*/i', $err)) {
+ echo "OK";
+ }
}
--EXPECT--
-Failed to connect to bogus.host.tld:25 [SMTP: Failed to connect socket: (code: -1, response: )]
+OK
Please sign in to comment.
Something went wrong with that request. Please try again.