Skip to content

Commit 85fcdb7

Browse files
committed
prevent shift first element unless is test
1 parent aaa40e2 commit 85fcdb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/PrettyPrinter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ public function endTest(Test $test, $time)
3535

3636
preg_match_all('/((?:^|[A-Z])[a-z]+)/', $testMethodName[1], $matches);
3737
$testNameArray = array_map('strtolower', $matches[0]);
38-
array_shift($testNameArray);
38+
39+
// check if prefix is test remove it
40+
if ($testNameArray[0] === 'test') {
41+
array_shift($testNameArray);
42+
}
43+
3944
$name = implode(' ', $testNameArray);
4045

4146
$color = 'fg-green';

0 commit comments

Comments
 (0)