Skip to content

Commit 85f8676

Browse files
Skipped tests alone no longer lead to a yellow background for the test result summary
1 parent 4e13243 commit 85f8676

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

ChangeLog-11.5.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes of the PHPUnit 11.5 release series are documented in this fi
44

55
## [11.5.43] - 2025-MM-DD
66

7+
### Changed
8+
9+
* Skipped tests alone no longer lead to a yellow background for the test result summary
10+
711
### Fixed
812

913
* [#6391](https://github.com/sebastianbergmann/phpunit/issues/6391): Errors during backup of global variables and static properties are not reported

src/TextUI/Output/SummaryPrinter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,33 @@ public function print(TestResult $result): void
6262
return;
6363
}
6464

65-
$color = 'fg-black, bg-yellow';
66-
6765
if ($result->wasSuccessful()) {
6866
if ($result->hasIssues()) {
67+
$color = 'fg-black, bg-yellow';
68+
6969
$this->printWithColor(
7070
$color,
7171
'OK, but there were issues!',
7272
);
7373
} else {
74+
$color = 'fg-black, bg-green';
75+
7476
$this->printWithColor(
7577
$color,
7678
'OK, but some tests were skipped!',
7779
);
7880
}
7981
} else {
80-
if ($result->hasTestErroredEvents() || $result->hasTestTriggeredPhpunitErrorEvents()) {
81-
$color = 'fg-white, bg-red';
82+
$color = 'fg-white, bg-red';
8283

84+
if ($result->hasTestErroredEvents() || $result->hasTestTriggeredPhpunitErrorEvents()) {
8385
$this->printWithColor(
84-
$color,
86+
'fg-white, bg-red',
8587
'ERRORS!',
8688
);
8789
} else {
88-
$color = 'fg-white, bg-red';
89-
9090
$this->printWithColor(
91-
$color,
91+
'fg-white, bg-red',
9292
'FAILURES!',
9393
);
9494
}

0 commit comments

Comments
 (0)