Mercurial > hg > rc1
view vendor/pear/mail_mime/tests/test_Bug_8386_1.phpt @ 15:459652c6089c
distro
author | Charlie Root |
---|---|
date | Sat, 13 Jan 2018 09:44:19 -0500 |
parents | 1e000243b222 |
children |
line wrap: on
line source
--TEST-- Bug #8386 HTML body not correctly encoded if attachments present --SKIPIF-- --FILE-- <?php $eol = "\n#"; include("Mail/mime.php"); $encoder = new Mail_mime(array('eol'=>$eol)); $encoder->setTXTBody('test'); $encoder->setHTMLBody('<b>test</b>'); $encoder->addAttachment('Just a test', 'application/octet-stream', 'test.txt', false); $body = $encoder->get(); if (strpos($body, '--' . $eol . '--=')){ print("FAILED\n"); print("Single delimiter() between 2 parts found.\n"); print($body); }else{ print("OK"); } ?> --EXPECT-- OK