mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
add test case for multiple To: lines
This commit is contained in:
parent
16fed222f6
commit
f870804c45
22
ext/mailparse/tests/003.phpt
Normal file
22
ext/mailparse/tests/003.phpt
Normal file
@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Check handling of multiple To headers
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mailparse")) print "skip"; ?>
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
$text = <<<EOD
|
||||
To: fred@bloggs.com
|
||||
To: wez@thebrainroom.com
|
||||
|
||||
hello, this is some text=hello.
|
||||
EOD;
|
||||
|
||||
$mime = mailparse_msg_create();
|
||||
mailparse_msg_parse($mime, $text);
|
||||
$data = mailparse_msg_get_part_data($mime);
|
||||
echo $data["headers"]["to"];
|
||||
?>
|
||||
--EXPECT--
|
||||
fred@bloggs.com, wez@thebrainroom.com
|
Loading…
Reference in New Issue
Block a user