Skip to content

Commit 8eaae8d

Browse files
Prevent illogical values for high lower bound and low upper bound
1 parent 18fad58 commit 8eaae8d

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

ChangeLog-8.5.md

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

99
* [#4874](https://github.com/sebastianbergmann/phpunit/pull/4874): `PHP_FLOAT_EPSILON` is now used instead of hardcoded `0.0000000001` in `PHPUnit\Framework\Constraint\IsIdentical`
1010

11+
### Fixed
12+
13+
* When the HTML code coverage report's configured low upper bound is larger than the high lower bound then the default values are used instead
14+
1115
## [8.5.23] - 2022-01-21
1216

1317
### Fixed

src/TextUI/TestRunner.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,11 @@ private function handleConfiguration(array &$arguments): void
12851285
$arguments['timeoutForMediumTests'] = $arguments['timeoutForMediumTests'] ?? 10;
12861286
$arguments['timeoutForSmallTests'] = $arguments['timeoutForSmallTests'] ?? 1;
12871287
$arguments['verbose'] = $arguments['verbose'] ?? false;
1288+
1289+
if ($arguments['reportLowUpperBound'] > $arguments['reportHighLowerBound']) {
1290+
$arguments['reportLowUpperBound'] = 50;
1291+
$arguments['reportHighLowerBound'] = 90;
1292+
}
12881293
}
12891294

12901295
private function processSuiteFilters(TestSuite $suite, array $arguments): void

0 commit comments

Comments
 (0)