bless_tests: Replace the object ID in var_dump() for namespaced classes (#19174)

This commit is contained in:
Tim Düsterhus 2025-07-18 20:43:23 +02:00 committed by GitHub
parent 2c42479890
commit 6ca6d569ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,7 +65,7 @@ function normalizeOutput(string $out): string {
$out = preg_replace('/in (\/|[A-Z]:\\\\)\S+ on line \d+/m', 'in %s on line %d', $out); $out = preg_replace('/in (\/|[A-Z]:\\\\)\S+ on line \d+/m', 'in %s on line %d', $out);
$out = preg_replace('/in (\/|[A-Z]:\\\\)\S+:\d+/m', 'in %s:%d', $out); $out = preg_replace('/in (\/|[A-Z]:\\\\)\S+:\d+/m', 'in %s:%d', $out);
$out = preg_replace('/\{closure:(\/|[A-Z]:\\\\)\S+:\d+\}/', '{closure:%s:%d}', $out); $out = preg_replace('/\{closure:(\/|[A-Z]:\\\\)\S+:\d+\}/', '{closure:%s:%d}', $out);
$out = preg_replace('/object\(([A-Za-z0-9]*)\)#\d+/', 'object($1)#%d', $out); $out = preg_replace('/object\(([A-Za-z0-9\\\\]*)\)#\d+/', 'object($1)#%d', $out);
$out = preg_replace('/^#(\d+) (\/|[A-Z]:\\\\)\S+\(\d+\):/m', '#$1 %s(%d):', $out); $out = preg_replace('/^#(\d+) (\/|[A-Z]:\\\\)\S+\(\d+\):/m', '#$1 %s(%d):', $out);
$out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out); $out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out);
$out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out); $out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out);