Opened 5 months ago
Last modified 4 months ago
#65147 new enhancement
Unit Tests: Add tests for iis7_save_url_rewrite_rules()
| 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 iis7_save_url_rewrite_rules() in src/wp-admin/includes/misc.php currently lacks unit tests. This ticket covers the addition of tests to ensure it correctly manages the web.config file on IIS7+ servers, handles multisite status, and correctly adds or deletes rules based on the current permalink structure.
Change History (2)
This ticket was mentioned in PR #11671 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)
…udes/misc.php
This PR adds comprehensive unit tests for the
iis7_save_url_rewrite_rules()function insrc/wp-admin/includes/misc.php.The tests cover:
web.configfile on IIS7+ servers.null).$is_iis7andiis7_supports_permalinks().Trac ticket: https://core.trac.wordpress.org/ticket/65147
## Use of AI Tools
AI assistance: Yes
Tool(s): Junie (JetBrains)
Model(s): gemini-3-flash-preview
Used for: Identifying edge cases, implementing temporary directory cleanup, and mocking environmental dependencies. All code follows WordPress Coding Standards.