mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-08 12:20:52 +00:00
make test unicode independent
This commit is contained in:
parent
442b5b3d51
commit
d5322753c4
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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] . '";';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user