Mercurial > hg > rc1
annotate vendor/pear/mail_mime/tests/test_Bug_12466.phpt @ 35:05c4c32948af
.hgignore: add vendor tree
composer.json: new packages
plugins/thunderbird_labels/thunderbird_labels.php: change hook and RFC822 use wrt whitelisting to avoid deprecated stuff
index.php: commented debugging hooks
others: new releases of vendor packages?
| author | Charlie Root |
|---|---|
| date | Thu, 30 Aug 2018 16:21:59 -0400 |
| parents | 1e000243b222 |
| children |
| rev | line source |
|---|---|
| 0 | 1 --TEST-- |
| 2 Bug #12466 Content-Transfer-Encoding checking | |
| 3 --SKIPIF-- | |
| 4 --FILE-- | |
| 5 <?php | |
| 6 include("Mail/mime.php"); | |
| 7 | |
| 8 $params = array( | |
| 9 'text_encoding' => '7bit', | |
| 10 'html_encoding' => '7bit', | |
| 11 ); | |
| 12 $mime = new Mail_mime($params); | |
| 13 $mime->setTXTBody("ż"); | |
| 14 $mime->setHTMLBody("z"); | |
| 15 $body = $mime->getMessage(); | |
| 16 | |
| 17 preg_match_all('/Content-Transfer-Encoding: (.*)/', $body, $m); | |
| 18 echo trim($m[1][0])."\n".trim($m[1][1]); | |
| 19 | |
| 20 ?> | |
| 21 --EXPECT-- | |
| 22 quoted-printable | |
| 23 7bit |
