com php-src: Rewrite test to avoid sending emails: ext/pcre/tests/bug72463.phpt ext/pcre/tests/bug72463 _2.phpt

From: Date: Wed, 06 Jul 2016 05:08:43 +0000
Subject: com php-src: Rewrite test to avoid sending emails: ext/pcre/tests/bug72463.phpt ext/pcre/tests/bug72463 _2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92828@lists.php.net to get a copy of this message
Commit: ff7c981d1927134809729ab164e6c23e9f63781d Author: Matteo Beccati <mbeccati@php.net> Wed, 6 Jul 2016 07:08:43 +0200 Parents: 869604eefb671df8baa236cbde067030162f9b34 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ff7c981d1927134809729ab164e6c23e9f63781d Log: Rewrite test to avoid sending emails A properly configured email server was generating bounce emails when running the test. Changed paths: M ext/pcre/tests/bug72463.phpt A ext/pcre/tests/bug72463_2.phpt Diff: diff --git a/ext/pcre/tests/bug72463.phpt b/ext/pcre/tests/bug72463.phpt index 3d38494...b40a721 100644 --- a/ext/pcre/tests/bug72463.phpt +++ b/ext/pcre/tests/bug72463.phpt @@ -1,13 +1,15 @@ --TEST-- Bug #72463 mail fails with invalid argument ---FILE-- +--SKIPIF-- <?php - if(substr(PHP_OS, 0, 3) == "WIN") { - ini_set("smtp", "non.existent.smtp.server"); -} else { - ini_set("sendmail_path", "echo hello >/dev/null"); + die('skip not for windows'); } +?> +--INI-- +sendmail_path="echo >/dev/null" +--FILE-- +<?php mail("some.address.it.wont.ever..reach@lookup.and.try.to.find.this.host.name","subject","a", ""); mail("some.address.it.wont.ever.reach@lookup.and.try.to.find.this.host.name","subject","a", NULL); diff --git a/ext/pcre/tests/bug72463_2.phpt b/ext/pcre/tests/bug72463_2.phpt new file mode 100644 index 0000000..1baeb0f --- /dev/null +++ b/ext/pcre/tests/bug72463_2.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #72463 mail fails with invalid argument +--SKIPIF-- +<?php +if(substr(PHP_OS, 0, 3) != "WIN") { + die('skip windows only'); +} +?> +--INI-- +SMTP=non.existent.smtp.server +--FILE-- +<?php + +mail("some.address.it.wont.ever.reach@lookup.and.try.to.find.this.host.name","subject","a", ""); +mail("some.address.it.wont.ever.reach@lookup.and.try.to.find.this.host.name","subject","a", NULL); + +?> +===DONE=== +--EXPECTREGEX-- +.*===DONE===

« previous php.cvs (#92828) next »