make test unicode independent

This commit is contained in:
TomasVotruba 2021-05-04 20:33:32 +02:00
parent 442b5b3d51
commit d5322753c4
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ class PregQuoted
{
public function run($subject)
{
preg_replace('/('.preg_quote("a", '/').')/e', 'strtoupper("\1")', $subject);
preg_replace('/('.preg_quote("a", '/').')/e', 'strtoupper("1")', $subject);
}
}
@ -21,7 +21,7 @@ class PregQuoted
public function run($subject)
{
preg_replace_callback('/('.preg_quote("a", '/').')/', function ($matches) {
return strtoupper("\x01");
return strtoupper("1");
}, $subject);
}
}

View File

@ -8,7 +8,7 @@ class Drupal
{
$replace = create_function(
'$m',
'$r="\x00{$m[1]}ecursion_features";
'$r="{$m[1]}ecursion_features";
return \'s:\'.strlen($r.$m[2]).\':"\'.$r.$m[2].\'";\';'
);
@ -30,7 +30,7 @@ class Drupal
public function run()
{
$replace = function ($m) {
$r = "\x00{$m[1]}ecursion_features";
$r = "{$m[1]}ecursion_features";
return 's:' . strlen($r . $m[2]) . ':"' . $r . $m[2] . '";';
};