annotate vendor/pear/mail_mime/tests/test_Bug_18772.phpt @ 43:771f6803cc4b default tip

somehow lost the correctly updated metadata so e.g. 'mail' package wasn't being imported
author Charlie Root
date Sun, 26 Jan 2025 13:13:49 -0500
parents 1e000243b222
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
1 --TEST--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
2 Bug #18772 Text/calendar message
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
3 --SKIPIF--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
4 --FILE--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
5 <?php
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
6 include "Mail/mime.php";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
7
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
8 $mime = new Mail_mime;
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
9 $mime->setSubject('test');
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
10
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
11 // A message with text/calendar only
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
12 $mime->setCalendarBody('VCALENDAR');
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
13
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
14 echo $mime->getMessage();
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
15 echo "\n---\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
16
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
17 // A message with alternative text
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
18 $mime->setTXTBody('vcalendar');
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
19 $msg = $mime->getMessage();
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
20
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
21 echo preg_replace('/=_[0-9a-z]+/', '*', $msg);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
22 --EXPECT--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
23 MIME-Version: 1.0
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
24 Content-Type: text/calendar; method=request; charset=UTF-8
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
25 Content-Transfer-Encoding: quoted-printable
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
26 Subject: test
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
27
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
28 VCALENDAR
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
29 ---
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
30 MIME-Version: 1.0
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
31 Content-Type: multipart/alternative;
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
32 boundary="*"
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
33 Content-Transfer-Encoding: quoted-printable
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
34 Subject: test
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
35
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
36 --*
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
37 Content-Transfer-Encoding: quoted-printable
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
38 Content-Type: text/plain; charset=ISO-8859-1
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
39
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
40 vcalendar
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
41 --*
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
42 Content-Transfer-Encoding: quoted-printable
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
43 Content-Type: text/calendar; method=request; charset=UTF-8
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
44
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
45 VCALENDAR
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
46 --*--