diff options
author | Matteo Beccati <mbeccati@php.net> | 2016-07-06 07:08:43 +0200 |
---|---|---|
committer | Matteo Beccati <mbeccati@php.net> | 2016-07-06 07:08:43 +0200 |
commit | ff7c981d1927134809729ab164e6c23e9f63781d (patch) | |
tree | 2b6396cfda2ae12c7ba124f9e461d49d4033f717 /ext/pcre | |
parent | 869604eefb671df8baa236cbde067030162f9b34 (diff) | |
download | php-git-ff7c981d1927134809729ab164e6c23e9f63781d.tar.gz |
Rewrite test to avoid sending emails
A properly configured email server was generating bounce emails when running
the test.
Diffstat (limited to 'ext/pcre')
-rw-r--r-- | ext/pcre/tests/bug72463.phpt | 12 | ||||
-rw-r--r-- | ext/pcre/tests/bug72463_2.phpt | 20 |
2 files changed, 27 insertions, 5 deletions
diff --git a/ext/pcre/tests/bug72463.phpt b/ext/pcre/tests/bug72463.phpt index 3d38494917..b40a721998 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 0000000000..1baeb0f2a1 --- /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=== |