Skip to content

Commit

Permalink
Only print resource usage information when tests were run
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 17, 2020
1 parent 1685173 commit 7258f8f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
6 changes: 1 addition & 5 deletions src/TextUI/ResultPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,9 @@ protected function printSkipped(TestResult $result): void
*/
protected function printHeader(TestResult $result): void
{
$this->write(\PHP_EOL);

if (\count($result) > 0) {
$this->write(\PHP_EOL);
$this->write(\PHP_EOL . \PHP_EOL . Timer::resourceUsage() . \PHP_EOL . \PHP_EOL);
}

$this->write(Timer::resourceUsage() . "\n\n");
}

protected function printFooter(TestResult $result): void
Expand Down
3 changes: 0 additions & 3 deletions tests/end-to-end/filter-method-case-sensitive-no-result.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.


Time: %s, Memory: %s

No tests executed!
3 changes: 0 additions & 3 deletions tests/end-to-end/filter-no-results.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.


Time: %s, Memory: %s

No tests executed!

0 comments on commit 7258f8f

Please sign in to comment.