Repository navigation
Tests: Cover wp_registration_url() - #15226
devmuhib009 wants to merge 1 commit into
Conversation
Add unit tests for wp_registration_url(): - Verify wp_registration_url() returns the default registration URL. - Verify the 'register_url' filter receives the expected argument and modifies the output. See #65819. Props devmuhib009.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
LGTM! Clear, focused unit test coverage for wp_registration_url(). Verifies default URL generation and the register_url filter argument handling and override cleanly. All checks pass.
AI Review: Gemini 3.8 Flash
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified in the added PHPUnit coverage for wp_registration_url().
No open issues 🎉
What changed in this PR
Adds PHPUnit coverage for wp_registration_url() as part of Trac ticket #65819, without changing production behavior.
Changes:
- Verifies that the function returns the default registration URL.
- Checks that the
register_urlfilter receives the expected URL and can override the return value.
| File | Description |
|---|---|
tests/phpunit/tests/general/wpRegistrationUrl.php |
Adds tests for the default registration URL and filter behavior. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
The registration URL and its filter arguments/return are already covered in Tests_General_WpLoginScreenUrls, landed in r65056. That class also checks forced HTTPS. Please drop the duplicate class; retain a change only if it covers a distinct missing regression in the existing class. Otherwise this PR can close as already covered.
All proposed cases passed locally in randomized single-site and multisite runs; the concern is duplicate coverage, not a runtime failure.
AI review · gpt-6
This PR adds unit test coverage for
wp_registration_url():wp_registration_url()returns the default registration URL (site_url( 'wp-login.php?action=register', 'login' )).register_urlfilter hook receives$registerand modifies the return value ofwp_registration_url().Trac ticket: https://core.trac.wordpress.org/ticket/65819
Props devmuhib009.