File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2727use function method_exists ;
2828use function preg_quote ;
2929use function preg_replace ;
30- use function range ;
30+ use function rtrim ;
3131use function sprintf ;
3232use function str_contains ;
3333use function str_ends_with ;
@@ -115,6 +115,7 @@ public function prettifyTestMethodName(string $name): string
115115 }
116116
117117 $ string = rtrim ($ name , '0123456789 ' );
118+
118119 if (array_key_exists ($ string , self ::$ strings )) {
119120 $ name = $ string ;
120121 } elseif ($ string === $ name ) {
@@ -143,7 +144,9 @@ public function prettifyTestMethodName(string $name): string
143144
144145 $ buffer = '' ;
145146
146- foreach (range (0 , strlen ($ name ) - 1 ) as $ i ) {
147+ $ len = strlen ($ name );
148+
149+ for ($ i = 0 ; $ i < $ len ; $ i ++) {
147150 if ($ i > 0 && $ name [$ i ] >= 'A ' && $ name [$ i ] <= 'Z ' ) {
148151 $ buffer .= ' ' . strtolower ($ name [$ i ]);
149152 } else {
You can’t perform that action at this time.
0 commit comments