Skip to content

Commit

Permalink
Closes #5291
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 26, 2023
1 parent c592f3b commit ddea63d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions ChangeLog-10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 10.0 release series are documented in this fi
### Fixed

* [#5270](https://github.com/sebastianbergmann/phpunit/issues/5270): `GlobalState::getIniSettingsAsString()` generates code that triggers warnings
* [#5291](https://github.com/sebastianbergmann/phpunit/pull/5291): Test Runner exits with wrong shell exit code after a PHPUnit error occurred

## [10.0.18] - 2023-03-22

Expand Down
2 changes: 1 addition & 1 deletion src/TextUI/ShellExitCodeCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function calculate(bool $failOnEmptyTestSuite, bool $failOnRisky, bool $f
}
}

if ($result->hasTestErroredEvents()) {
if ($result->hasTestErroredEvents() || $result->hasTestTriggeredPhpunitErrorEvents()) {
$returnCode = self::EXCEPTION_EXIT;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/event/empty-data-provider.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Test Suite Sorted
Test Runner Execution Started (0 tests)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 1)
PHPUnit Finished (Shell Exit Code: 2)
2 changes: 1 addition & 1 deletion tests/end-to-end/event/exception-in-data-provider.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Test Suite Sorted
Test Runner Execution Started (0 tests)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 1)
PHPUnit Finished (Shell Exit Code: 2)
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Test Finished (PHPUnit\TestFixture\Event\InvalidDataProviderWithOneTestPassingTe
Test Suite Finished (PHPUnit\TestFixture\Event\InvalidDataProviderWithOneTestPassingTest, 1 test)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 1)
PHPUnit Finished (Shell Exit Code: 2)
2 changes: 1 addition & 1 deletion tests/end-to-end/event/invalid-data-provider.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Test Suite Sorted
Test Runner Execution Started (0 tests)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 1)
PHPUnit Finished (Shell Exit Code: 2)

0 comments on commit ddea63d

Please sign in to comment.