Skip to content

Commit

Permalink
Fix HEREDOC in tests for php 7.3 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejohns authored and mindplay-dk committed Jan 30, 2019
1 parent f64a843 commit 2333b01
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions tests/integration/SMTPClientCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function sendSMTPMessage(IntegrationTester $I)

$quoted_body = quoted_printable_encode("Hey, Bar!\r\n\r\nIt's me! Foo!\r\n\r\nHow you been man?\r\n\r\n.\r\n\r\n.foo!\r\n\r\nhehehe :-)\r\n\r\n");

$mime_message = <<<MIME
$mime_message = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?utf-8?q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand All @@ -33,7 +33,7 @@ public function sendSMTPMessage(IntegrationTester $I)
Content-Transfer-Encoding: quoted-printable
{$quoted_body}
MIME;
EOT;

$client->sendMail(
"[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/SecureSocketCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function sendSMTPMessageOverSecureSocket(IntegrationTester $I, Scenario $

$quoted_body = quoted_printable_encode("Hey, Bar!\r\n\r\nIt's me! Foo!\r\n\r\nHow you been man?\r\n\r\n.\r\n\r\n.foo!\r\n\r\nhehehe :-)\r\n\r\n");

$mime_message = <<<MIME
$mime_message = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?utf-8?q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand All @@ -35,7 +35,7 @@ public function sendSMTPMessageOverSecureSocket(IntegrationTester $I, Scenario $
Content-Transfer-Encoding: quoted-printable
{$quoted_body}
MIME;
EOT;

$client->sendMail(
"[email protected]",
Expand Down
56 changes: 28 additions & 28 deletions tests/unit/MIMEWriterCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function writeTextMessage(UnitTester $I)

$quoted_body = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?UTF-8?Q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand All @@ -66,7 +66,7 @@ public function writeTextMessage(UnitTester $I)
{$quoted_body}
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -79,7 +79,7 @@ public function writeTextMessageWithAttachment(UnitTester $I)

$quoted_body = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?UTF-8?Q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected], [email protected]
Expand All @@ -103,7 +103,7 @@ public function writeTextMessageWithAttachment(UnitTester $I)
{$encoded_attachment}
--++++mixed-03e3b4a304d78659f1a3c0a3cea31a4d73f3a426++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -114,7 +114,7 @@ public function writeHTMLMessage(UnitTester $I)

$quoted_body = TestMessageFactory::HTML_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?UTF-8?Q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand All @@ -125,7 +125,7 @@ public function writeHTMLMessage(UnitTester $I)
{$quoted_body}
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -138,7 +138,7 @@ public function writeHTMLMessageWithAttachment(UnitTester $I)

$quoted_body = TestMessageFactory::HTML_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?UTF-8?Q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand All @@ -161,7 +161,7 @@ public function writeHTMLMessageWithAttachment(UnitTester $I)
{$encoded_attachment}
--++++mixed-03e3b4a304d78659f1a3c0a3cea31a4d73f3a426++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -173,7 +173,7 @@ public function writeTextAndHTMLMessage(UnitTester $I)
$quoted_text = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;
$quoted_html = TestMessageFactory::HTML_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: Rasmus Schultz <[email protected]>
From: [email protected]
Expand All @@ -193,7 +193,7 @@ public function writeTextAndHTMLMessage(UnitTester $I)
{$quoted_html}
--++++alternative-aaafaf7c286e771e9bd71eacae9f26ae36c9c650++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -208,7 +208,7 @@ public function writeTextAndHTMLMessageWithAttachment(UnitTester $I)

$quoted_html_body = TestMessageFactory::HTML_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: =?UTF-8?Q?Rasmus =C3=A5h Schultz?= <[email protected]>
From: [email protected]
Expand Down Expand Up @@ -240,7 +240,7 @@ public function writeTextAndHTMLMessageWithAttachment(UnitTester $I)
{$encoded_attachment}
--++++mixed-03e3b4a304d78659f1a3c0a3cea31a4d73f3a426++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -258,7 +258,7 @@ public function writeMessageWithMultipleAttachments(UnitTester $I)

$quoted_body = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: Rasmus Schultz <[email protected]>
From: [email protected]
Expand Down Expand Up @@ -287,7 +287,7 @@ public function writeMessageWithMultipleAttachments(UnitTester $I)
{$encoded_second_attachment}
--++++mixed-03e3b4a304d78659f1a3c0a3cea31a4d73f3a426++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -296,7 +296,7 @@ public function writeMessageWithMultipleRecipients(UnitTester $I)
{
$message = $this->factory->createMessageWithMultipleRecipients();

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: Rasmus Schultz <[email protected]>, Also Rasmus Schultz <[email protected]>
From: [email protected]
Expand All @@ -307,7 +307,7 @@ public function writeMessageWithMultipleRecipients(UnitTester $I)
Hello!
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -316,7 +316,7 @@ public function writeMessageWithCCAndBCCRecipients(UnitTester $I)
{
$message = $this->factory->createMessageWithCCAndBCCRecipients();

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand All @@ -328,7 +328,7 @@ public function writeMessageWithCCAndBCCRecipients(UnitTester $I)
Hello!
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -337,7 +337,7 @@ public function writeMessageWithCustomHeaders(UnitTester $I)
{
$message = $this->factory->createMessageWithCustomHeaders();

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand All @@ -349,7 +349,7 @@ public function writeMessageWithCustomHeaders(UnitTester $I)
Hello!
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -362,7 +362,7 @@ public function writeMessageWithInlineAttachment(UnitTester $I)

$encoded_message = TestMessageFactory::HTML_BODY_WITH_INLINE_IMAGE_QP;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand All @@ -384,7 +384,7 @@ public function writeMessageWithInlineAttachment(UnitTester $I)
{$encoded_inline_attachment}
--++++related-39b004dfb8671932b47924cc47958a54d3b4524e++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -399,7 +399,7 @@ public function writeMessageWithInlineAttachmentAndTextAlternative(UnitTester $I

$encoded_alt_message = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand Down Expand Up @@ -430,7 +430,7 @@ public function writeMessageWithInlineAttachmentAndTextAlternative(UnitTester $I
{$encoded_inline_attachment}
--++++related-39b004dfb8671932b47924cc47958a54d3b4524e++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -445,7 +445,7 @@ public function writeMessageWithInlineAndRegularAttachments(UnitTester $I)

$encoded_attachment = TestMessageFactory::TEXT_BODY_BASE64;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand Down Expand Up @@ -479,7 +479,7 @@ public function writeMessageWithInlineAndRegularAttachments(UnitTester $I)
{$encoded_inline_attachment}
--++++related-39b004dfb8671932b47924cc47958a54d3b4524e++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand All @@ -496,7 +496,7 @@ public function writeMessageWithInlineAndRegularAttachmentsAndTextAlternative(Un

$encoded_alt_message = TestMessageFactory::TEXT_BODY_QUOTED_PRINTABLE;

$expected_mime = <<<MIME
$expected_mime = <<<EOT
Date: Thu, 15 Sep 2016 17:20:54 +0200
To: [email protected]
From: [email protected]
Expand Down Expand Up @@ -539,7 +539,7 @@ public function writeMessageWithInlineAndRegularAttachmentsAndTextAlternative(Un
{$encoded_inline_attachment}
--++++related-39b004dfb8671932b47924cc47958a54d3b4524e++++--
MIME;
EOT;

$I->assertSame($expected_mime, $this->toMIME($message));
}
Expand Down

0 comments on commit 2333b01

Please sign in to comment.