Skip to content

Commit 510c4ea

Browse files
committed
Test case extended to include attachment filename decoding Webklex#410
1 parent f8f17f6 commit 510c4ea

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

tests/issues/Issue410Test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ public function testIssueEmail() {
2222
$message = Message::fromFile($filename);
2323

2424
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", (string)$message->subject);
25+
26+
$attachments = $message->getAttachments();
27+
28+
self::assertSame(1, $attachments->count());
29+
30+
$attachment = $attachments->first();
31+
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->filename);
32+
self::assertSame("☆第132号 「ガーデン&エクステリア」専門店のためのQ&Aサロン 【月刊エクステリア・ワーク】", $attachment->name);
2533
}
2634

2735
}

tests/messages/issue-410.eml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ From: [email protected]
22
33
Subject: =?ISO-2022-JP?B?GyRCIXlCaBsoQjEzMhskQjlmISEhViUsITwlRyVzGyhCJhskQiUoJS8lOSVGJWolIiFXQGxMZ0U5JE4kPyRhJE4jURsoQiYbJEIjQSU1JW0lcyEhIVo3bjQpJSglLyU5JUYlaiUiISYlbyE8JS8hWxsoQg==?=
44
Date: Wed, 13 Sep 2017 13:05:45 +0200
5-
Content-Type: text/plain;
6-
charset="us-ascii"
7-
Content-Transfer-Encoding: quoted-printable
5+
MIME-Version: 1.0
6+
Content-Type: multipart/mixed;
7+
boundary="------------B832AF745285AEEC6D5AEE42"
88

9-
Hi
9+
Hi
10+
--------------B832AF745285AEEC6D5AEE42
11+
Content-Transfer-Encoding: base64
12+
Content-Disposition: attachment;
13+
filename="=?ISO-2022-JP?B?GyRCIXlCaBsoQjEzMhskQjlmISEhViUsITwlRyVzGyhCJhskQiUoJS8lOSVGJWolIiFXQGxMZ0U5JE4kPyRhJE4jURsoQiYbJEIjQSU1JW0lcyEhIVo3bjQpJSglLyU5JUYlaiUiISYlbyE8JS8hWxsoQg==?="
14+
15+
SGkh
16+
--------------B832AF745285AEEC6D5AEE42--

0 commit comments

Comments
 (0)