Skip to content

Commit

Permalink
Remove requirement to save json_encode modifier cp1252 unit test file…
Browse files Browse the repository at this point in the history
… in that encoding
  • Loading branch information
cmanley committed May 16, 2024
1 parent 52878fe commit 77cac4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Smarty PHPunit tests of modifier.
* This file must be saved in Windows-1252 encoding!
* This file should be saved in UTF-8 encoding for comment legibility.
*/

namespace UnitTests\TemplateSource\TagTests\PluginModifier;
Expand Down Expand Up @@ -40,7 +40,7 @@ public function dataForDefault() {
["abc", '"abc"'],
[["abc"], '["abc"]'],
[["abc",["a"=>2]], '["abc",{"a":2}]'],
[['€uro',['Schlüssel'=>'Straße']], '["\u20acuro",{"Schl\u00fcssel":"Stra\u00dfe"}]'], # € = x80 in cp1252; ü = xFC in cp1252; ß = xDF in cp1252;
[["\x80uro",["Schl\xFCssel"=>"Stra\xDFe"]], '["\u20acuro",{"Schl\u00fcssel":"Stra\u00dfe"}]'], # x80 = € = euro, xFC = ü = uuml, xDF = ß = szlig
];
}

Expand Down Expand Up @@ -69,7 +69,7 @@ public function dataForForceObject() {
["abc", '"abc"'],
[["abc"], '{"0":"abc"}'],
[["abc",["a"=>2]], '{"0":"abc","1":{"a":2}}'],
[['€uro'], '{"0":"\u20acuro"}'],
[["\x80uro"], '{"0":"\u20acuro"}'],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function dataForDefault() {
["abc", '"abc"'],
[["abc"], '["abc"]'],
[["abc",["a"=>2]], '["abc",{"a":2}]'],
[['€uro',['Schlüssel'=>'Straße']], '["\u20acuro",{"Schl\u00fcssel":"Stra\u00dfe"}]'], # € = x80 in cp1252; ü = xFC in cp1252; ß = xDF in cp1252;
[["€uro",["Schlüssel"=>"Straße"]], '["\u20acuro",{"Schl\u00fcssel":"Stra\u00dfe"}]'], # \u{20ac} = € = euro, \u{00fc} = ü = uuml, xDF = \u{00df} = szlig
];
}

Expand Down Expand Up @@ -68,7 +68,7 @@ public function dataForForceObject() {
["abc", '"abc"'],
[["abc"], '{"0":"abc"}'],
[["abc",["a"=>2]], '{"0":"abc","1":{"a":2}}'],
[['€uro'], '{"0":"\u20acuro"}'],
[["€uro"], '{"0":"\u20acuro"}'],
];
}

Expand Down

0 comments on commit 77cac4e

Please sign in to comment.