Skip to content

Commit 7258f8f

Browse files
Only print resource usage information when tests were run
1 parent 1685173 commit 7258f8f

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

src/TextUI/ResultPrinter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,9 @@ protected function printSkipped(TestResult $result): void
390390
*/
391391
protected function printHeader(TestResult $result): void
392392
{
393-
$this->write(\PHP_EOL);
394-
395393
if (\count($result) > 0) {
396-
$this->write(\PHP_EOL);
394+
$this->write(\PHP_EOL . \PHP_EOL . Timer::resourceUsage() . \PHP_EOL . \PHP_EOL);
397395
}
398-
399-
$this->write(Timer::resourceUsage() . "\n\n");
400396
}
401397

402398
protected function printFooter(TestResult $result): void

tests/end-to-end/filter-method-case-sensitive-no-result.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,4 @@ PHPUnit\TextUI\Command::main();
1212
--EXPECTF--
1313
PHPUnit %s by Sebastian Bergmann and contributors.
1414

15-
16-
Time: %s, Memory: %s
17-
1815
No tests executed!

tests/end-to-end/filter-no-results.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,4 @@ PHPUnit\TextUI\Command::main();
1212
--EXPECTF--
1313
PHPUnit %s by Sebastian Bergmann and contributors.
1414

15-
16-
Time: %s, Memory: %s
17-
1815
No tests executed!

0 commit comments

Comments
 (0)