diff --git a/prefixer/fix-swiftmailer.php b/prefixer/fix-swiftmailer.php index 05966de439..cf86c2bfc1 100755 --- a/prefixer/fix-swiftmailer.php +++ b/prefixer/fix-swiftmailer.php @@ -14,6 +14,8 @@ foreach ($files as $file) { $data = preg_replace("/'(Swift_[^']*?::)/", "'MailPoetVendor\\\\\\\\$1", $data); $data = preg_replace("/InstanceOf\('(Swift_[^']*?')/", "InstanceOf('MailPoetVendor\\\\\\\\$1", $data); $data = preg_replace("/registerAutoload\('(_swift[^']*?')/", "registerAutoload('MailPoetVendor\\\\\\\\$1", $data); + $data = preg_replace("/'(Swift_[^']*?Listener)/", "'MailPoetVendor\\\\\\\\$1", $data); + $data = str_replace("'Swift_CharacterReader_", "'MailPoetVendor\\\\Swift_CharacterReader_", $data); $data = str_replace('SWIFT_INIT_LOADED', 'MAILPOET_SWIFT_INIT_LOADED', $data); // require-once 'swift_init.php' in classes since prefixed version won't use Swift's autoloader diff --git a/tests/acceptance/ReceiveStandardEmailCest.php b/tests/acceptance/ReceiveStandardEmailCest.php index 23376e0069..a4970d39db 100644 --- a/tests/acceptance/ReceiveStandardEmailCest.php +++ b/tests/acceptance/ReceiveStandardEmailCest.php @@ -17,7 +17,10 @@ class ReceiveStandardEmailCest { function receiveStandardEmail(\AcceptanceTester $I) { $this->settings->withCronTriggerMethod('WordPress'); - $newsletter_title = 'Receive Test' . \MailPoet\Util\Security::generateRandomString(); + // try some special characters in the subject to ensure they are received correctly + $special_chars = '… © & ěščřžýáíéůėꀿąß∂‍‍‍'; + + $newsletter_title = 'Receive Test ' . $special_chars; $standard_template = '[data-automation-id=\'select_template_0\']'; $title_element = '[data-automation-id=\'newsletter_title\']'; $send_form_element = '[data-automation-id="newsletter_send_form"]'; diff --git a/tests/integration/Mailer/Methods/AmazonSESTest.php b/tests/integration/Mailer/Methods/AmazonSESTest.php index a194fc78ea..ba71d7736d 100644 --- a/tests/integration/Mailer/Methods/AmazonSESTest.php +++ b/tests/integration/Mailer/Methods/AmazonSESTest.php @@ -45,7 +45,7 @@ class AmazonSESTest extends \MailPoetTest { ); $this->subscriber = 'Recipient '; $this->newsletter = [ - 'subject' => 'testing AmazonSES', + 'subject' => 'testing AmazonSES … © & ěščřžýáíéůėꀿąß∂ 😊👨‍👩‍👧‍👧', // try some special chars 'body' => [ 'html' => 'HTML body', 'text' => 'TEXT body', diff --git a/tests/integration/Mailer/Methods/MailPoetAPITest.php b/tests/integration/Mailer/Methods/MailPoetAPITest.php index f2d710776a..555aa51b13 100644 --- a/tests/integration/Mailer/Methods/MailPoetAPITest.php +++ b/tests/integration/Mailer/Methods/MailPoetAPITest.php @@ -40,7 +40,7 @@ class MailPoetAPITest extends \MailPoetTest { ); $this->subscriber = 'Recipient '; $this->newsletter = [ - 'subject' => 'testing MailPoet', + 'subject' => 'testing MailPoet … © & ěščřžýáíéůėꀿąß∂ 😊👨‍👩‍👧‍👧', // try some special chars 'body' => [ 'html' => 'HTML body', 'text' => 'TEXT body', diff --git a/tests/integration/Mailer/Methods/PHPMailTest.php b/tests/integration/Mailer/Methods/PHPMailTest.php index 171bd00d4d..751f81cc8c 100644 --- a/tests/integration/Mailer/Methods/PHPMailTest.php +++ b/tests/integration/Mailer/Methods/PHPMailTest.php @@ -30,7 +30,7 @@ class PHPMailTest extends \MailPoetTest { ); $this->subscriber = 'Recipient '; $this->newsletter = [ - 'subject' => 'testing local method (PHP mail)', + 'subject' => 'testing local method (PHP mail) … © & ěščřžýáíéůėꀿąß∂ 😊👨‍👩‍👧‍👧', // try some special chars 'body' => [ 'html' => 'HTML body', 'text' => 'TEXT body', diff --git a/tests/integration/Mailer/Methods/SMTPTest.php b/tests/integration/Mailer/Methods/SMTPTest.php index 90c766e085..d4f30aa1e7 100644 --- a/tests/integration/Mailer/Methods/SMTPTest.php +++ b/tests/integration/Mailer/Methods/SMTPTest.php @@ -52,7 +52,7 @@ class SMTPTest extends \MailPoetTest { ); $this->subscriber = 'Recipient '; $this->newsletter = [ - 'subject' => 'testing SMTP', + 'subject' => 'testing SMTP … © & ěščřžýáíéůėꀿąß∂ 😊👨‍👩‍👧‍👧', // try some special chars 'body' => [ 'html' => 'HTML body', 'text' => 'TEXT body', diff --git a/tests/integration/Mailer/Methods/SendGridTest.php b/tests/integration/Mailer/Methods/SendGridTest.php index 6a1595e19e..ee60fd6167 100644 --- a/tests/integration/Mailer/Methods/SendGridTest.php +++ b/tests/integration/Mailer/Methods/SendGridTest.php @@ -35,7 +35,7 @@ class SendGridTest extends \MailPoetTest { ); $this->subscriber = 'Recipient '; $this->newsletter = [ - 'subject' => 'testing SendGrid', + 'subject' => 'testing SendGrid … © & ěščřžýáíéůėꀿąß∂ 😊👨‍👩‍👧‍👧', // try some special chars 'body' => [ 'html' => 'HTML body', 'text' => 'TEXT body',