Skip to content

Commit

Permalink
Slowness report lines remove periods
Browse files Browse the repository at this point in the history
Some users reported this could cause confusion with output detection
searching for a period to indicate a passing test. PHPUnit displays
a period for a passing test in its normal output.
  • Loading branch information
johnkary committed Oct 17, 2022
1 parent 386f65b commit c3c4859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SpeedTrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ protected function getHiddenCount(): int
*/
protected function renderHeader(): void
{
echo sprintf("\n\nYou should really speed up these slow tests (>%sms)...\n", $this->slowThreshold);
echo sprintf("\n\nYou should really speed up these slow tests (>%sms)\n", $this->slowThreshold);
}

/**
Expand All @@ -211,7 +211,7 @@ protected function renderBody(): void
$time = array_shift($slowTests);
$seconds = $time / 1000;

echo sprintf(" %s. %ss to run %s\n", $i, $seconds, $label);
echo sprintf(" %s) %ss to run %s\n", $i, $seconds, $label);
}
}

Expand All @@ -221,7 +221,7 @@ protected function renderBody(): void
protected function renderFooter(): void
{
if ($hidden = $this->getHiddenCount()) {
printf("...and there %s %s more above your threshold hidden from view\n", $hidden == 1 ? 'is' : 'are', $hidden);
printf("and there %s %s more above your threshold hidden from view\n", $hidden == 1 ? 'is' : 'are', $hidden);
}
}

Expand Down

0 comments on commit c3c4859

Please sign in to comment.