diff --git a/ChangeLog-9.5.md b/ChangeLog-9.5.md index 727d17bae4c..83237287873 100644 --- a/ChangeLog-9.5.md +++ b/ChangeLog-9.5.md @@ -2,6 +2,12 @@ All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [9.5.5] - 2021-MM-DD + +### Fixed + +* [#4632](https://github.com/sebastianbergmann/phpunit/issues/4632): TestDox result printer does not handle repeated test execution correctly + ## [9.5.4] - 2021-03-23 ### Fixed @@ -41,6 +47,7 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil * [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly +[9.5.5]: https://github.com/sebastianbergmann/phpunit/compare/9.5.4...9.5 [9.5.4]: https://github.com/sebastianbergmann/phpunit/compare/9.5.3...9.5.4 [9.5.3]: https://github.com/sebastianbergmann/phpunit/compare/9.5.2...9.5.3 [9.5.2]: https://github.com/sebastianbergmann/phpunit/compare/9.5.1...9.5.2 diff --git a/src/Util/TestDox/TestDoxPrinter.php b/src/Util/TestDox/TestDoxPrinter.php index 088c6e018ac..e3ae8c93f82 100644 --- a/src/Util/TestDox/TestDoxPrinter.php +++ b/src/Util/TestDox/TestDoxPrinter.php @@ -239,7 +239,8 @@ protected function flushOutputBuffer(bool $forceFlush = false): void } if ($this->testFlushIndex > 0) { - if ($this->enableOutputBuffer) { + if ($this->enableOutputBuffer && + isset($this->originalExecutionOrder[$this->testFlushIndex - 1])) { $prevResult = $this->getTestResultByName($this->originalExecutionOrder[$this->testFlushIndex - 1]); } else { $prevResult = $this->testResults[$this->testFlushIndex - 1]; diff --git a/tests/end-to-end/regression/GitHub/4632.phpt b/tests/end-to-end/regression/GitHub/4632.phpt new file mode 100644 index 00000000000..ae19c371fff --- /dev/null +++ b/tests/end-to-end/regression/GitHub/4632.phpt @@ -0,0 +1,45 @@ +--TEST-- +https://github.com/sebastianbergmann/phpunit/issues/4632 +--FILE-- + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\TestFixture; + +use PHPUnit\Framework\TestCase; + +final class Issue4632Test extends TestCase +{ + public function testOne(): void + { + $this->assertTrue(false); + } +}