Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close output buffer when exception occurs during setup #607

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

dlh01
Copy link
Member

@dlh01 dlh01 commented Dec 12, 2024

We have a test that makes a GET request and expects an exception to be thrown during the parse_request action, which fires as part ofPending_Testable_Request::setup_wordpress_query().

The exception is thrown, but the output buffer started just before then remains open, leading to a PHPUnit "risky test" warning: Test code or tested code did not (only) close its own output buffers. This PR makes sure the buffer is closed.

@dlh01 dlh01 force-pushed the feature/catch-setup-exceptions branch 2 times, most recently from b1babf3 to ec56cf6 Compare December 12, 2024 06:32
@dlh01 dlh01 force-pushed the feature/catch-setup-exceptions branch from ec56cf6 to 9158273 Compare December 12, 2024 06:36
Copy link
Member

@jakewrfoster jakewrfoster left a comment

Choose a reason for hiding this comment

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

😎 👍

@srtfisher srtfisher enabled auto-merge (squash) December 13, 2024 14:12
@srtfisher srtfisher disabled auto-merge December 13, 2024 14:12
@srtfisher srtfisher merged commit 9fdb1a9 into 1.x Dec 13, 2024
13 checks passed
@srtfisher srtfisher deleted the feature/catch-setup-exceptions branch December 13, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants