[wp-trac] [WordPress Trac] #33821: redirect_canonical does not consider port in $compare_original
WordPress Trac
noreply at wordpress.org
Wed Jun 18 13:25:01 UTC 2025
#33821: redirect_canonical does not consider port in $compare_original
-------------------------------------------------+-------------------------
Reporter: willshouse | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Canonical | Version: 2.3
Severity: normal | Resolution:
Keywords: has-patch has-test-info has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
By the way, I'm noticing that all the 7 tests are identical
I think that it will be better to use just one function + a data provider.
Give 6 parameters (`home_url`, `site_url`, `request_host`, `request_url`
and `expected_url`, a `failure_msg`, as the array parameters, and then
pass each element)
Also, after each assert, you can add the `failure_msg`.
[https://core.trac.wordpress.org/attachment/ticket/33821/33821.tests.diff
I attach here the patch] for reference so you can integrate it in your PR.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33821#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list