-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Smarty & domain token processing to use token processor
This is a subset of the changes in #19550 that we should be able to resolve & merge while addressing that takes longer. It still gets us the benefit of adopting a preferred pattern Note that some test changes exist around handling of subject - the code now converts a new line to a space consistently. In addition tests that rely on leakage have been altered as smarty does not leak with this approach
- Loading branch information
1 parent
661c69f
commit 82e5b7a
Showing
4 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ public function testDomainTokens(): void { | |
Up the road | ||
London, 90210 | ||
~ [email protected] ~ 1 ~ rather nice', $messageContent['text']); | ||
$this->assertEquals('Default Domain Name ~ ~ Buckingham palaceUp the roadLondon, 90210~ [email protected] ~ 1 ~ rather nice', $messageContent['subject']); | ||
$this->assertEquals('Default Domain Name ~ ~ Buckingham palace Up the road London, 90210 ~ [email protected] ~ 1 ~ rather nice', $messageContent['subject']); | ||
} | ||
|
||
/** | ||
|
@@ -246,7 +246,7 @@ public function testContactTokens(): void { | |
'; | ||
$this->assertEquals($expected, $messageContent['html']); | ||
$this->assertEquals($expected, $messageContent['text']); | ||
$this->assertEquals(str_replace("\n", '', $expected), $messageContent['subject']); | ||
$this->assertEquals(rtrim(str_replace("\n", ' ', $expected)), $messageContent['subject']); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters