]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - vendor/pear/mail_mime/tests/test_Bug_13444.phpt
MediaWiki 1.30.2
[autoinstalls/mediawiki.git] / vendor / pear / mail_mime / tests / test_Bug_13444.phpt
1 --TEST--
2 Bug #9725   multipart/related & alternative wrong order
3 --SKIPIF--
4 --FILE--
5 <?php
6 include("Mail/mime.php");
7
8 $mime = new Mail_mime();
9 $mime->setTXTBody("test");
10 $mime->setHTMLBody("test");
11 $mime->addHTMLImage("test", 'application/octet-stream', '', false);
12 $body = $mime->get();
13 $head = $mime->headers();
14 $headCT = $head['Content-Type'];
15 $headCT = explode(";", $headCT);
16 $headCT = $headCT[0];
17
18 $ct = preg_match_all('|Content-Type: ([^;\r\n]+)|', $body, $matches);
19 print($headCT);
20 print("\n");
21 foreach ($matches[1] as $match){
22     print($match);
23     print("\n");
24 }
25 --EXPECT--
26 multipart/alternative
27 text/plain
28 multipart/related
29 text/html
30 application/octet-stream