Opened 5 months ago
Last modified 5 months ago
#65135 new enhancement
Unit Tests: Add tests for got_url_rewrite()
| Reported by: | pbearne | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | tests |
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.
5 months ago
#1
- Keywords has-patch has-unit-tests added
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.