Skip to content

Commit a4fe003

Browse files
committed
issue Webklex#413 test case added
1 parent 9d6a2d5 commit a4fe003

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

tests/issues/Issue413Test.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/*
3+
* File: Issue413Test.php
4+
* Category: Test
5+
* Author: M.Goldenbaum
6+
* Created: 23.06.23 21:09
7+
* Updated: -
8+
*
9+
* Description:
10+
* -
11+
*/
12+
13+
namespace Tests\issues;
14+
15+
use PHPUnit\Framework\TestCase;
16+
use Webklex\PHPIMAP\Message;
17+
18+
class Issue413Test extends TestCase {
19+
20+
public function testIssueEmail() {
21+
$filename = implode(DIRECTORY_SEPARATOR, [__DIR__, "..", "messages", "issue-413.eml"]);
22+
$message = Message::fromFile($filename);
23+
24+
self::assertSame("Test Message", (string)$message->subject);
25+
self::assertSame("This is just a test, so ignore it (if you can!)\r\n\r\nTony Marston", $message->getTextBody());
26+
}
27+
28+
}

tests/messages/issue-413.eml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Return-Path: <[email protected]>
2+
Delivered-To: [email protected]
3+
Received: from ion.dnsprotect.com
4+
by ion.dnsprotect.com with LMTP
5+
id oPy8IzIke2Rr4gIAzEkvSQ
6+
(envelope-from <[email protected]>)
7+
for <[email protected]>; Sat, 03 Jun 2023 07:29:54 -0400
8+
Return-path: <[email protected]>
9+
Envelope-to: [email protected]
10+
Delivery-date: Sat, 03 Jun 2023 07:29:54 -0400
11+
Received: from [::1] (port=48740 helo=ion.dnsprotect.com)
12+
by ion.dnsprotect.com with esmtpa (Exim 4.96)
13+
(envelope-from <[email protected]>)
14+
id 1q5PSF-000nPQ-1F
15+
16+
Sat, 03 Jun 2023 07:29:54 -0400
17+
MIME-Version: 1.0
18+
Date: Sat, 03 Jun 2023 07:29:54 -0400
19+
From: radicore <[email protected]>
20+
21+
Subject: Test Message
22+
User-Agent: Roundcube Webmail/1.6.0
23+
Message-ID: <[email protected]>
24+
25+
Content-Type: text/plain; charset=US-ASCII;
26+
format=flowed
27+
Content-Transfer-Encoding: 7bit
28+
X-From-Rewrite: unmodified, already matched
29+
30+
This is just a test, so ignore it (if you can!)
31+
32+
Tony Marston

0 commit comments

Comments
 (0)