1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/mbstring/tests/bug52681.phpt
Christoph M. Becker 51eec5086f Run mb_send_mail tests on Windows, too
We use the run-tests.php `{MAIL}` abstraction instead of `cat`.

Closes GH-7908.
2022-01-07 22:46:02 +01:00

35 lines
665 B
PHP

--TEST--
Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
die("skip mb_send_mail() not available");
}
?>
--INI--
sendmail_path={MAIL:{PWD}/bug52681.eml}
mail.add_x_header=off
--FILE--
<?php
$to = 'example@example.com';
$headers = 'MIME-Version: 2.0';
mb_send_mail($to, mb_language(), "test", $headers);
readfile(__DIR__ . "/bug52681.eml");
?>
--CLEAN--
<?php
@unlink(__DIR__ . "/bug52681.eml");
?>
--EXPECTF--
To: example@example.com
Subject: %s
MIME-Version: 2.0
Content-Type: text/plain; charset=%s
Content-Transfer-Encoding: %s
%s