From cbf4682ad55bb9d27e63ea76b640945e0582d5a0 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Sun, 8 Jan 2023 21:07:50 +0900 Subject: [PATCH] test: Change the test to match the behavior of the MailTransport class. see: https://github.com/kamilwylegala/cakephp2-php8/pull/20 Co-authored-by: Kenshin Okinaka --- .../Case/Network/Email/MailTransportTest.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/Cake/Test/Case/Network/Email/MailTransportTest.php b/lib/Cake/Test/Case/Network/Email/MailTransportTest.php index f9e0c4ba3..60f218c1f 100644 --- a/lib/Cake/Test/Case/Network/Email/MailTransportTest.php +++ b/lib/Cake/Test/Case/Network/Email/MailTransportTest.php @@ -63,23 +63,23 @@ class MailTransportTest extends CakeTestCase { $encoded = '=?UTF-8?B?Rm/DuCBCw6VyIELDqXogRm/DuCBCw6VyIELDqXogRm/DuCBCw6VyIELDqXog?='; $encoded .= ' =?UTF-8?B?Rm/DuCBCw6VyIELDqXo=?='; - $data = "From: CakePHP Test " . PHP_EOL; - $data .= "Return-Path: CakePHP Return " . PHP_EOL; - $data .= "Cc: Mark Story , Juan Basso " . PHP_EOL; - $data .= "Bcc: phpnut@cakephp.org" . PHP_EOL; - $data .= "X-Mailer: CakePHP Email" . PHP_EOL; - $data .= "Date: " . $date . PHP_EOL; - $data .= "X-add: " . $encoded . PHP_EOL; - $data .= "Message-ID: <4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>" . PHP_EOL; - $data .= "MIME-Version: 1.0" . PHP_EOL; - $data .= "Content-Type: text/plain; charset=UTF-8" . PHP_EOL; + $data = "From: CakePHP Test " . "\r\n"; + $data .= "Return-Path: CakePHP Return " . "\r\n"; + $data .= "Cc: Mark Story , Juan Basso " . "\r\n"; + $data .= "Bcc: phpnut@cakephp.org" . "\r\n"; + $data .= "X-Mailer: CakePHP Email" . "\r\n"; + $data .= "Date: " . $date . "\r\n"; + $data .= "X-add: " . $encoded . "\r\n"; + $data .= "Message-ID: <4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>" . "\r\n"; + $data .= "MIME-Version: 1.0" . "\r\n"; + $data .= "Content-Type: text/plain; charset=UTF-8" . "\r\n"; $data .= "Content-Transfer-Encoding: 8bit"; $this->MailTransport->expects($this->once())->method('_mail') ->with( 'CakePHP ', $encoded, - implode(PHP_EOL, array('First Line', 'Second Line', '.Third Line', '')), + implode("\r\n", array('First Line', 'Second Line', '.Third Line', '')), $data, '-f' );