test(subs): match wp_redirect filter signature in invite test#524
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates a PHPUnit test helper in newspack-plugin’s WooCommerce Subscriptions group-subscription invite tests so its wp_redirect filter callback accepts the expected argument, avoiding argument-count failures when the filter is invoked.
Changes:
- Adjust the
run_invite_request()redirect-capture closure to accept the redirect location parameter (matching the approach used by the similar helper in the same test file).
|
Hey @jason10lee, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Resolves NPPM-2974 (cosmetic follow-up from the #488 / NPPM-2966 review).
The
run_invite_request()test helper hookswp_redirectwith a zero-parameterclosure. Give it an explicit
$locationparameter so it matches the filtersignature and the sibling
capture_link_invite_log_events()helper in the samefile. No behavior change — the closure still throws to unwind the handler.
How to test the changes in this Pull Request:
n test-php --filter Test_Group_Subscription_Invite— still green (8 tests).Other information: