diff --git a/test/MessageTest.php b/test/MessageTest.php index 3fb98d6f..a702a1a0 100644 --- a/test/MessageTest.php +++ b/test/MessageTest.php @@ -829,7 +829,7 @@ public function testHeaderUnfoldingWorksAsExpectedForMultipartMessages(): void */ public function testCanParseMultipartReport(): void { - $raw = file_get_contents(__DIR__ . '/_files/laminas-mail-19.txt'); + $raw = file_get_contents(__DIR__ . '/_files/laminas-mail-19.eml'); $message = Message::fromString($raw); $this->assertInstanceOf(Message::class, $message); $this->assertIsString($message->getBody()); diff --git a/test/Storage/MessageTest.php b/test/Storage/MessageTest.php index 73aa3be5..a8a87223 100644 --- a/test/Storage/MessageTest.php +++ b/test/Storage/MessageTest.php @@ -30,8 +30,8 @@ class MessageTest extends TestCase public function setUp(): void { - $this->file = __DIR__ . '/../_files/mail.txt'; - $this->file2 = __DIR__ . '/../_files/mail_multi_to.txt'; + $this->file = __DIR__ . '/../_files/mail.eml'; + $this->file2 = __DIR__ . '/../_files/mail_multi_to.eml'; } public function testInvalidFile(): void @@ -482,8 +482,8 @@ public function testMultivaluedToHeader(): void public function filesProvider(): array { - $filePath = __DIR__ . '/../_files/mail.txt'; - $fileBlankLineOnTop = __DIR__ . '/../_files/mail_blank_top_line.txt'; + $filePath = __DIR__ . '/../_files/mail.eml'; + $fileBlankLineOnTop = __DIR__ . '/../_files/mail_blank_top_line.eml'; return [ // Description => [params] diff --git a/test/_files/laminas-mail-19.txt b/test/_files/laminas-mail-19.eml similarity index 97% rename from test/_files/laminas-mail-19.txt rename to test/_files/laminas-mail-19.eml index eed6a1de..6b7d6703 100644 --- a/test/_files/laminas-mail-19.txt +++ b/test/_files/laminas-mail-19.eml @@ -1,94 +1,94 @@ -Date: Wed, 21 Aug 2013 00:22:27 -0700 -From: Mail Delivery Subsystem -Message-Id: <201308210722.r7L7Lpmx022081@localhost.localdomain> -To: -MIME-Version: 1.0 -Content-Type: multipart/report; report-type=delivery-status;boundary="r7L7Lpmx022081.1377069747/localhost.localdomain" -Subject: Returned mail: see transcript for details -Auto-Submitted: auto-generated (failure) - -This is a MIME-encapsulated message - ---r7L7Lpmx022081.1377069747/localhost.localdomain - -The original message was received at Fri, 16 Aug 2013 00:00:48 -0700 -from localhost.localdomain [127.0.0.1] - - ----- The following addresses had permanent fatal errors ----- - - - ----- Transcript of session follows ----- -... Deferred -Message could not be delivered for 5 days -Message will be deleted from queue - ---r7L7Lpmx022081.1377069747/localhost.localdomain -Content-Type: message/delivery-status - -Reporting-MTA: dns; localhost.localdomain -Arrival-Date: Fri, 16 Aug 2013 00:00:48 -0700 - -Final-Recipient: RFC822; sysadmin@internet.com -Action: failed -Status: 4.4.7 -Last-Attempt-Date: Wed, 21 Aug 2013 00:22:27 -0700 - ---r7L7Lpmx022081.1377069747/localhost.localdomain -Content-Type: message/rfc822 - -Date: Fri, 16 Aug 2013 00:00:48 -0700 -From: root -Message-Id: <201308160700.r7G70msc008297@localhost.localdomain> -To: sysadmin@example.com -Subject: MySQL Backup Log for example.com - 2013-08-16_00h00m - -====================================================================== -AutoMySQLBackup VER 2.5 -http://sourceforge.net/projects/automysqlbackup/ - -Backup of Database Server - test.com -====================================================================== -Backup Start Time Fri Aug 16 00:00:01 PDT 2013 -====================================================================== -Daily Backup of Database ( information_schema ) -Rotating last weeks Backup... -removed `/backups' - ----------------------------------------------------------------------- -Daily Backup of Database ( confluence ) -Rotating last weeks Backup... -removed `/backupnce.bz2' - ----------------------------------------------------------------------- -Daily Backup of Database ( crucible ) -Rotating last weeks Backup... -removed `/backups/daily/.bz2' - ----------------------------------------------------------------------- -Daily Backup of Database ( jira ) -Rotating last weeks Backup... -removed `/bal.bz2' - ----------------------------------------------------------------------- -Daily Backup of Database ( jira_4_2 ) -Rotating last weeks Backup... -removed `/backups/dail.sql.bz2' - ----------------------------------------------------------------------- -Daily Backup of Database ( mysql ) -Rotating last weeks Backup... -removed `/backups/dql.bz2' - ----------------------------------------------------------------------- -Backup End Fri Aug 16 00:00:48 PDT 2013 -====================================================================== -Total disk space used for backup storage.. -Size - Location -62.21T /backups - -====================================================================== -If you find AutoMySQLBackup valuable please make a donation at -http://sourceforge.net/project/project_donations.php?group_id=101066 -====================================================================== - ---r7L7Lpmx022081.1377069747/localhost.localdomain-- +Date: Wed, 21 Aug 2013 00:22:27 -0700 +From: Mail Delivery Subsystem +Message-Id: <201308210722.r7L7Lpmx022081@localhost.localdomain> +To: +MIME-Version: 1.0 +Content-Type: multipart/report; report-type=delivery-status;boundary="r7L7Lpmx022081.1377069747/localhost.localdomain" +Subject: Returned mail: see transcript for details +Auto-Submitted: auto-generated (failure) + +This is a MIME-encapsulated message + +--r7L7Lpmx022081.1377069747/localhost.localdomain + +The original message was received at Fri, 16 Aug 2013 00:00:48 -0700 +from localhost.localdomain [127.0.0.1] + + ----- The following addresses had permanent fatal errors ----- + + + ----- Transcript of session follows ----- +... Deferred +Message could not be delivered for 5 days +Message will be deleted from queue + +--r7L7Lpmx022081.1377069747/localhost.localdomain +Content-Type: message/delivery-status + +Reporting-MTA: dns; localhost.localdomain +Arrival-Date: Fri, 16 Aug 2013 00:00:48 -0700 + +Final-Recipient: RFC822; sysadmin@internet.com +Action: failed +Status: 4.4.7 +Last-Attempt-Date: Wed, 21 Aug 2013 00:22:27 -0700 + +--r7L7Lpmx022081.1377069747/localhost.localdomain +Content-Type: message/rfc822 + +Date: Fri, 16 Aug 2013 00:00:48 -0700 +From: root +Message-Id: <201308160700.r7G70msc008297@localhost.localdomain> +To: sysadmin@example.com +Subject: MySQL Backup Log for example.com - 2013-08-16_00h00m + +====================================================================== +AutoMySQLBackup VER 2.5 +http://sourceforge.net/projects/automysqlbackup/ + +Backup of Database Server - test.com +====================================================================== +Backup Start Time Fri Aug 16 00:00:01 PDT 2013 +====================================================================== +Daily Backup of Database ( information_schema ) +Rotating last weeks Backup... +removed `/backups' + +---------------------------------------------------------------------- +Daily Backup of Database ( confluence ) +Rotating last weeks Backup... +removed `/backupnce.bz2' + +---------------------------------------------------------------------- +Daily Backup of Database ( crucible ) +Rotating last weeks Backup... +removed `/backups/daily/.bz2' + +---------------------------------------------------------------------- +Daily Backup of Database ( jira ) +Rotating last weeks Backup... +removed `/bal.bz2' + +---------------------------------------------------------------------- +Daily Backup of Database ( jira_4_2 ) +Rotating last weeks Backup... +removed `/backups/dail.sql.bz2' + +---------------------------------------------------------------------- +Daily Backup of Database ( mysql ) +Rotating last weeks Backup... +removed `/backups/dql.bz2' + +---------------------------------------------------------------------- +Backup End Fri Aug 16 00:00:48 PDT 2013 +====================================================================== +Total disk space used for backup storage.. +Size - Location +62.21T /backups + +====================================================================== +If you find AutoMySQLBackup valuable please make a donation at +http://sourceforge.net/project/project_donations.php?group_id=101066 +====================================================================== + +--r7L7Lpmx022081.1377069747/localhost.localdomain-- diff --git a/test/_files/mail.txt b/test/_files/mail.eml similarity index 95% rename from test/_files/mail.txt rename to test/_files/mail.eml index 52587bac..13ae2b3b 100644 --- a/test/_files/mail.txt +++ b/test/_files/mail.eml @@ -1,27 +1,27 @@ -To: foo@example.com -Subject: multipart -Date: Sun, 01 Jan 2000 00:00:00 +0000 -From: =?UTF-8?Q?"Peter M=C3=BCller"?= -ContENT-type: multipart/alternative; boUNDary="crazy-multipart" -Message-ID: -MIME-version: 1.0 - -multipart message ---crazy-multipart -Content-type: text/plain - -The first part -is horizontal - ---crazy-multipart -Content-type: text/x-vertical - -T s p i v -h e a s e -e c r r - o t t - n i - d c - a - l ---crazy-multipart-- +To: foo@example.com +Subject: multipart +Date: Sun, 01 Jan 2000 00:00:00 +0000 +From: =?UTF-8?Q?"Peter M=C3=BCller"?= +ContENT-type: multipart/alternative; boUNDary="crazy-multipart" +Message-ID: +MIME-version: 1.0 + +multipart message +--crazy-multipart +Content-type: text/plain + +The first part +is horizontal + +--crazy-multipart +Content-type: text/x-vertical + +T s p i v +h e a s e +e c r r + o t t + n i + d c + a + l +--crazy-multipart-- diff --git a/test/_files/mail_blank_top_line.txt b/test/_files/mail_blank_top_line.eml similarity index 95% rename from test/_files/mail_blank_top_line.txt rename to test/_files/mail_blank_top_line.eml index 56a53e93..151f6254 100644 --- a/test/_files/mail_blank_top_line.txt +++ b/test/_files/mail_blank_top_line.eml @@ -1,28 +1,28 @@ - -To: foo@example.com -Subject: multipart -Date: Sun, 01 Jan 2000 00:00:00 +0000 -From: =?UTF-8?Q?"Peter M=C3=BCller"?= -ContENT-type: multipart/alternative; boUNDary="crazy-multipart" -Message-ID: -MIME-version: 1.0 - -multipart message ---crazy-multipart -Content-type: text/plain - -The first part -is horizontal - ---crazy-multipart -Content-type: text/x-vertical - -T s p i v -h e a s e -e c r r - o t t - n i - d c - a - l ---crazy-multipart-- + +To: foo@example.com +Subject: multipart +Date: Sun, 01 Jan 2000 00:00:00 +0000 +From: =?UTF-8?Q?"Peter M=C3=BCller"?= +ContENT-type: multipart/alternative; boUNDary="crazy-multipart" +Message-ID: +MIME-version: 1.0 + +multipart message +--crazy-multipart +Content-type: text/plain + +The first part +is horizontal + +--crazy-multipart +Content-type: text/x-vertical + +T s p i v +h e a s e +e c r r + o t t + n i + d c + a + l +--crazy-multipart-- diff --git a/test/_files/mail_multi_to.txt b/test/_files/mail_multi_to.eml similarity index 96% rename from test/_files/mail_multi_to.txt rename to test/_files/mail_multi_to.eml index 469aeb57..ec359733 100644 --- a/test/_files/mail_multi_to.txt +++ b/test/_files/mail_multi_to.eml @@ -1,11 +1,11 @@ -Return-Path: -Date: Sun, 01 Jan 2000 00:00:00 +0000 -From: sender@example.com -To: =?ISO-8859-2?Q?nicpo=F1?= , "foo" -Subject: Subject text -Content-Type: text/html; charset=iso-8859-2 -Content-Transfer-Encoding: 8bit -Content-Disposition: inline - -
html content
- +Return-Path: +Date: Sun, 01 Jan 2000 00:00:00 +0000 +From: sender@example.com +To: =?ISO-8859-2?Q?nicpo=F1?= , "foo" +Subject: Subject text +Content-Type: text/html; charset=iso-8859-2 +Content-Transfer-Encoding: 8bit +Content-Disposition: inline + +
html content
+