We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b90dee5 commit 9233162Copy full SHA for 9233162
src/Logging/TestDox/NamePrettifier.php
@@ -108,6 +108,7 @@ public function prettifyTestClassName(string $className): string
108
return $result;
109
}
110
111
+ // NOTE: this method is on a hot path and very performance sensitive. change with care.
112
public function prettifyTestMethodName(string $name): string
113
{
114
$buffer = '';
@@ -136,8 +137,9 @@ public function prettifyTestMethodName(string $name): string
136
137
138
$name[0] = strtoupper($name[0]);
139
- if (str_contains($name, '_')) {
140
- return trim(str_replace('_', ' ', $name));
+ $noUnderscore = str_replace('_', ' ', $name);
141
+ if ($noUnderscore !== $name) {
142
+ return trim($noUnderscore);
143
144
145
$wasNumeric = false;
0 commit comments