mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
Rewrite test to avoid sending emails
A properly configured email server was generating bounce emails when running the test.
This commit is contained in:
parent
869604eefb
commit
ff7c981d19
@ -1,14 +1,16 @@
|
||||
--TEST--
|
||||
Bug #72463 mail fails with invalid argument
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) == "WIN") {
|
||||
die('skip not for windows');
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
sendmail_path="echo >/dev/null"
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
if(substr(PHP_OS, 0, 3) == "WIN") {
|
||||
ini_set("smtp", "non.existent.smtp.server");
|
||||
} else {
|
||||
ini_set("sendmail_path", "echo hello >/dev/null");
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
20
ext/pcre/tests/bug72463_2.phpt
Normal file
20
ext/pcre/tests/bug72463_2.phpt
Normal file
@ -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===
|
Loading…
Reference in New Issue
Block a user