X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php84-pecl-mailparse_3.2.0-1.el8/tests
opt
/
alt
/
tests
/
alt-php84-pecl-mailparse_3.2.0-1.el8
/
tests
/
??
..
??
001.phpt
(328 B)
??
002.phpt
(571 B)
??
003.phpt
(597 B)
??
004.phpt
(765 B)
??
005.phpt
(948 B)
??
006.phpt
(2.26 KB)
??
007.phpt
(1.15 KB)
??
008.phpt
(354 B)
??
009.phpt
(896 B)
??
010.phpt
(1.27 KB)
??
011.phpt
(678 B)
??
012-stream.phpt
(476 B)
??
012-var.phpt
(465 B)
??
012.phpt
(435 B)
??
013.phpt
(354 B)
??
bug001.phpt
(685 B)
??
bug73110.phpt
(909 B)
??
bug74223.phpt
(705 B)
??
bug75825.phpt
(2.1 KB)
??
bug81403.phpt
(542 B)
??
bug81422.phpt
(424 B)
??
gh19.phpt
(935 B)
??
gh20.phpt
(2.55 KB)
??
gh21.phpt
(1.6 KB)
??
gh22.phpt
(1.76 KB)
??
gh24.phpt
(710 B)
??
gh29.phpt
(598 B)
??
gh30.phpt
(837 B)
??
gh43.phpt
(967 B)
??
gh44.phpt
(2.12 KB)
??
parse_test_messages.phpt
(4.66 KB)
??
testdata
Editing: gh20.phpt
--TEST-- GH issue #20 (Unexpected parsed value of content-id with parentheses) --SKIPIF-- <?php if (!extension_loaded("mailparse")) die("skip mailparse extension not available"); ?> --FILE-- <?php $mime = "Content-Type: image/png\r\n" . "Content-Transfer-Encoding: base64\r\n" . "Content-ID: <Facebook_32x32(1)_aa284ba9-f148-4698-9c1f-c8e92bdb842e.png>\r\n" . "\r\n" . "iVBOR\r\n"; $resource = mailparse_msg_create(); mailparse_msg_parse($resource, $mime); $part = mailparse_msg_get_part($resource, 1); $data = mailparse_msg_get_part_data($part); echo "content-id: " . $data['content-id'] . "\n"; /* Also test bare content-id without angle brackets */ $mime2 = "Content-Type: image/png\r\n" . "Content-Transfer-Encoding: base64\r\n" . "Content-ID: Facebook_32x32(1)_test.png\r\n" . "\r\n" . "iVBOR\r\n"; $resource2 = mailparse_msg_create(); mailparse_msg_parse($resource2, $mime2); $part2 = mailparse_msg_get_part($resource2, 1); $data2 = mailparse_msg_get_part_data($part2); echo "content-id bare: " . $data2['content-id'] . "\n"; /* Standard RFC-compliant content-id */ $mime3 = "Content-Type: image/png\r\n" . "Content-ID: <part1@example.com>\r\n" . "\r\n" . "iVBOR\r\n"; $resource3 = mailparse_msg_create(); mailparse_msg_parse($resource3, $mime3); $part3 = mailparse_msg_get_part($resource3, 1); $data3 = mailparse_msg_get_part_data($part3); echo "content-id rfc: " . $data3['content-id'] . "\n"; /* RFC-compliant content-id with trailing comment */ $mime4 = "Content-Type: image/png\r\n" . "Content-ID: <part1@example.com> (comment)\r\n" . "\r\n" . "iVBOR\r\n"; $resource4 = mailparse_msg_create(); mailparse_msg_parse($resource4, $mime4); $part4 = mailparse_msg_get_part($resource4, 1); $data4 = mailparse_msg_get_part_data($part4); echo "content-id trailing comment: " . $data4['content-id'] . "\n"; /* Duplicate Content-ID headers (stored as array internally) */ $mime5 = "Content-Type: image/png\r\n" . "Content-ID: <first@example.com>\r\n" . "Content-ID: <second@example.com>\r\n" . "\r\n" . "iVBOR\r\n"; $resource5 = mailparse_msg_create(); mailparse_msg_parse($resource5, $mime5); $part5 = mailparse_msg_get_part($resource5, 1); $data5 = mailparse_msg_get_part_data($part5); echo "content-id duplicate: " . $data5['content-id'] . "\n"; echo "ok\n"; ?> --EXPECT-- content-id: Facebook_32x32(1)_aa284ba9-f148-4698-9c1f-c8e92bdb842e.png content-id bare: Facebook_32x32(1)_test.png content-id rfc: part1@example.com content-id trailing comment: part1@example.com content-id duplicate: first@example.com ok
Upload File
Create Folder