summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2016-07-06 07:10:10 +0200
committerMatteo Beccati <mbeccati@php.net>2016-07-06 07:10:10 +0200
commite2e72e1f5c2fb32a2e7166a8acdf18957decaeda (patch)
tree336f6202606c3bee6d94c7b9173f93742986bf5f /ext/pcre
parent210b6a2528bb4981dbd9897861386c451618334d (diff)
parentff7c981d1927134809729ab164e6c23e9f63781d (diff)
downloadphp-git-e2e72e1f5c2fb32a2e7166a8acdf18957decaeda.tar.gz
Merge branch 'PHP-7.0'
* PHP-7.0: Rewrite test to avoid sending emails
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/tests/bug72463.phpt12
-rw-r--r--ext/pcre/tests/bug72463_2.phpt20
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===