Skip to content

Implement TestCase->expectProcessExit($exitCode)#6275

Closed
staabm wants to merge 2 commits intosebastianbergmann:mainfrom
staabm:exit
Closed

Implement TestCase->expectProcessExit($exitCode)#6275
staabm wants to merge 2 commits intosebastianbergmann:mainfrom
staabm:exit

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Jul 15, 2025

POC for #6234

Comment thread ProcessExitTest.php
public function testOne(?int $expectedExit, int $actualExitCode): void
{
if ($expectedExit !== null) {
$this->expectProcessExit($expectedExit);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a PHPUnit error/warning when expectProcessExit is called in a test, which does not use process-isolation

Comment thread src/Framework/TestRunner/ChildProcessResultProcessor.php Outdated
@staabm staabm changed the base branch from main to 12.3 August 14, 2025 13:13
@staabm staabm changed the base branch from 12.3 to main August 14, 2025 13:14
@sebastianbergmann
Copy link
Copy Markdown
Owner

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

@staabm staabm deleted the exit branch September 23, 2025 12:25
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants