comparison vendor/pear/mail_mime/tests/test_Bug_10999_1.phpt @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
1 --TEST--
2 Bug #10999 Bad Content-ID(cid) format
3 --SKIPIF--
4 --FILE--
5 <?php
6 $from='user@from.example.com';
7
8 require_once('Mail/mime.php');
9
10 $mime=new Mail_mime();
11
12 $body='<img src="test.gif"/>';
13
14 $mime->setHTMLBody($body);
15 $mime->setFrom($from);
16 $mime->addHTMLImage('','image/gif', 'test.gif', false);
17 $msg=$mime->get();
18
19 $header = preg_match('|Content-ID: <[0-9a-fA-F]+@from.example.com>|', $msg);
20 if (!$header){
21 print("FAIL:\n");
22 print($msg);
23 }else{
24 print("OK");
25 }
26 --EXPECT--
27 OK