Opened 7 weeks ago
Last modified 5 weeks ago
#65135 new enhancement
Unit Tests: Add tests for got_url_rewrite()
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch has-unit-tests |
| Focuses: | tests | Cc: |
Description
The function got_url_rewrite() in src/wp-admin/includes/misc.php currently lacks unit tests. This PR adds tests to ensure it correctly identifies URL rewriting support across Apache, nginx, IIS, and Caddy, and respects the 'got_url_rewrite' filter.
Change History (2)
This ticket was mentioned in PR #11657 on WordPress/wordpress-develop by @pbearne.
7 weeks ago
#1
- Keywords has-patch has-unit-tests added
Note: See
TracTickets for help on using
tickets.
Reference: https://core.trac.wordpress.org/ticket/65135
This PR adds comprehensive unit tests for the
got_url_rewrite()function insrc/wp-admin/includes/misc.php.The tests verify detection across different server environments:
got_mod_rewrite)$is_nginxglobal)$is_caddyglobal)got_url_rewritefilter.Trac ticket: https://core.trac.wordpress.org/ticket/65135
## Use of AI Tools
AI assistance: Yes
Tool(s): Junie (JetBrains)
Model(s): gemini-3-flash-preview
Used for: Test structure generation, global variable mocking strategy, and dataProvider implementation.