X7ROOT File Manager
Current Path:
/opt/alt/php70/usr/share/pear/test/Mail_Mime/tests
opt
/
alt
/
php70
/
usr
/
share
/
pear
/
test
/
Mail_Mime
/
tests
/
ðŸ“
..
📄
class-filename.phpt
(242 B)
📄
content_transfer_encoding.phpt
(924 B)
📄
encoding_case.phpt
(244 B)
📄
headers_with_mbstring.phpt
(8.65 KB)
📄
headers_without_mbstring.phpt
(8.32 KB)
📄
qp_encoding_test.phpt
(3.47 KB)
📄
sleep_wakeup_EOL-bug3488-part1.phpt
(545 B)
📄
sleep_wakeup_EOL-bug3488-part2.phpt
(586 B)
📄
test_Bug_10596_1.phpt
(296 B)
📄
test_Bug_10816_1.phpt
(570 B)
📄
test_Bug_10999_1.phpt
(491 B)
📄
test_Bug_11381.phpt
(557 B)
📄
test_Bug_11731.phpt
(684 B)
📄
test_Bug_12165.phpt
(381 B)
📄
test_Bug_12385_1.phpt
(539 B)
📄
test_Bug_12411.phpt
(649 B)
📄
test_Bug_12466.phpt
(445 B)
📄
test_Bug_13032.phpt
(539 B)
📄
test_Bug_13444.phpt
(670 B)
📄
test_Bug_13962.phpt
(367 B)
📄
test_Bug_14529.phpt
(521 B)
📄
test_Bug_14779.phpt
(489 B)
📄
test_Bug_14780.phpt
(351 B)
📄
test_Bug_15320.phpt
(462 B)
📄
test_Bug_16539.phpt
(7.34 KB)
📄
test_Bug_17025.phpt
(412 B)
📄
test_Bug_17175.phpt
(695 B)
📄
test_Bug_18083.phpt
(592 B)
📄
test_Bug_18772.phpt
(880 B)
📄
test_Bug_19497.phpt
(547 B)
📄
test_Bug_20226.phpt
(341 B)
📄
test_Bug_20273.phpt
(302 B)
📄
test_Bug_20563.phpt
(378 B)
📄
test_Bug_20564.phpt
(270 B)
📄
test_Bug_21027.phpt
(7.12 KB)
📄
test_Bug_21098.phpt
(390 B)
📄
test_Bug_21205.phpt
(1.28 KB)
📄
test_Bug_21206.phpt
(590 B)
📄
test_Bug_21255.phpt
(352 B)
📄
test_Bug_3513_1.phpt
(475 B)
📄
test_Bug_3513_2.phpt
(567 B)
📄
test_Bug_3513_3.phpt
(631 B)
📄
test_Bug_7561_1.phpt
(645 B)
📄
test_Bug_8386_1.phpt
(551 B)
📄
test_Bug_8541_1.phpt
(499 B)
📄
test_Bug_9722_1.phpt
(360 B)
📄
test_Bug_GH16.phpt
(1.56 KB)
📄
test_Bug_GH19.phpt
(997 B)
📄
test_Bug_GH26.phpt
(755 B)
📄
test_linebreak_dot.phpt
(1.65 KB)
📄
test_linebreak_larger_76.phpt
(2.25 KB)
Editing: test_Bug_21027.phpt
--TEST-- Bug #21027 Calendar support along with attachments and html images --SKIPIF-- --FILE-- <?php require_once('Mail/mime.php'); $txtBody = 'Hi, this is Plain Text Body.'; $htmlBody = '<div>This is HTML body.</div>'; $icsText = 'BEGIN:VCALENDAR VERSION:2.0 PRODID:-//icalcreator//NONSGML iCalcreator 2.22// METHOD:REQUEST BEGIN:VEVENT UID:77@localhost DTSTAMP:20160208T170811Z ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=Jacob Alvarez:MAILTO:fake1@mailinator.com CREATED:20160208T170810Z DTSTART:20160215T180000Z DTEND:20160215T190000Z ORGANIZER;CN=-:MAILTO:fake2@mailinator.com SEQUENCE:1 STATUS:CONFIRMED SUMMARY:Prueba 69 TRANSP:OPAQUE URL:http://localhost/event/77 END:VEVENT END:VCALENDAR'; function printPartsStartAndEnd($body) { $matches = array(); preg_match_all('/--(=_[a-z0-9]+)--|Content-Type: ([^;\r\n]+)/', $body, $matches); $tab = " "; foreach ($matches[0] as $match){ if (strpos($match, '--') === false) { printf("%s%s\n", $tab, $match); if (stripos($match, "multipart")) { $tab .= " "; } } else { $tab = substr($tab, 0, -4); printf("%sEnd part\n", $tab); } } } function printHeaderContentType($headers) { $headerContentType = array(); preg_match('/([^;\r\n]+)/', $headers['Content-Type'], $headerContentType); printf("Content-Type: %s\n", $headerContentType[0]); } print "TEST: text\n"; $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: html\n"; $mime = new Mail_mime(); $mime->setHTMLBody($htmlBody); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: attachments\n"; $mime = new Mail_mime(); $mime->addAttachment($icsText, 'application/ics', 'invite.ics', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: text + attachments\n"; $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->addAttachment($icsText, 'application/ics', 'invite.ics', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: html + attachments\n"; $mime = new Mail_mime(); $mime->setHTMLBody($htmlBody); $mime->addAttachment($icsText, 'application/ics', 'invite.ics', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: html + inline images\n"; $mime = new Mail_mime(); $mime->setHTMLBody($htmlBody); $mime->addHTMLImage("aaaaaaaaaa", 'image/gif', 'image.gif', false, 'contentid'); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print("TEST: txt, html and attachment\n"); $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->setHTMLBody($htmlBody); $mime->addAttachment("test", 'application/octet-stream', 'attachment', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: calendar\n"; $mime = new Mail_mime(); $mime->setCalendarBody($icsText); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: txt + calendar\n"; $mime->setTXTBody($txtBody); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: txt, html, calendar\n"; $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->setHTMLBody($htmlBody); $mime->setCalendarBody($icsText); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: txt, html + html images, and calendar\n"; $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->setHTMLBody($htmlBody); $mime->addHTMLImage('testimage', 'image/gif', "bus.gif", false); $mime->setCalendarBody($icsText); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print("TEST: txt, html, calendar and attachment\n"); $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->setHTMLBody($htmlBody); $mime->setCalendarBody($icsText); $mime->addAttachment("test", 'application/octet-stream', 'attachment', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); print "TEST: txt, html + html images, calendar, and attachment\n"; $mime = new Mail_mime(); $mime->setTXTBody($txtBody); $mime->setHTMLBody($htmlBody); $mime->addHTMLImage('testimage', 'image/gif', "bus.gif", false); $mime->setCalendarBody($icsText); $mime->addAttachment($icsText, 'application/ics', 'invite.ics', false); $headers = $mime->headers(); $body = $mime->get(); printHeaderContentType($headers); printPartsStartAndEnd($body); print("\n"); ?> --EXPECT-- TEST: text Content-Type: text/plain TEST: html Content-Type: text/html TEST: attachments Content-Type: multipart/mixed Content-Type: application/ics End part TEST: text + attachments Content-Type: multipart/mixed Content-Type: text/plain Content-Type: application/ics End part TEST: html + attachments Content-Type: multipart/mixed Content-Type: text/html Content-Type: application/ics End part TEST: html + inline images Content-Type: multipart/related Content-Type: text/html Content-Type: image/gif End part TEST: txt, html and attachment Content-Type: multipart/mixed Content-Type: multipart/alternative Content-Type: text/plain Content-Type: text/html End part Content-Type: application/octet-stream End part TEST: calendar Content-Type: text/calendar TEST: txt + calendar Content-Type: multipart/alternative Content-Type: text/plain Content-Type: text/calendar End part TEST: txt, html, calendar Content-Type: multipart/alternative Content-Type: text/plain Content-Type: text/html Content-Type: text/calendar End part TEST: txt, html + html images, and calendar Content-Type: multipart/alternative Content-Type: text/plain Content-Type: multipart/related Content-Type: text/html Content-Type: image/gif End part Content-Type: text/calendar End part TEST: txt, html, calendar and attachment Content-Type: multipart/mixed Content-Type: multipart/alternative Content-Type: text/plain Content-Type: text/html Content-Type: text/calendar End part Content-Type: application/octet-stream End part TEST: txt, html + html images, calendar, and attachment Content-Type: multipart/mixed Content-Type: multipart/alternative Content-Type: text/plain Content-Type: multipart/related Content-Type: text/html Content-Type: image/gif End part Content-Type: text/calendar End part Content-Type: application/ics End part
Upload File
Create Folder