Opened 19 hours ago
Last modified 19 hours ago
#65203 new enhancement
Tests: Add unit tests for wp_check_php_version()
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch has-unit-tests |
| Focuses: | tests | Cc: |
Description
This ticket adds comprehensive unit tests for the wp_check_php_version() function in wp-admin/includes/misc.php. The tests will cover API response handling, transient caching, the wp_is_php_version_acceptable filter, and future minimum version logic (e.g., forcing warnings for PHP < 8.0).
Change History (1)
This ticket was mentioned in PR #11764 on WordPress/wordpress-develop by @pbearne.
19 hours ago
#1
- Keywords has-patch has-unit-tests added
Note: See
TracTickets for help on using
tickets.
Description:
This PR adds unit tests for the
wp_check_php_version()function inwp-admin/includes/misc.php. These tests ensure that WordPress correctly checks the active PHP version against the Serve Happy API, handles API failures gracefully, manages caching via site transients, and correctly enforces minimum version requirements.The tests cover:
false).wp_is_php_version_acceptablefilter.Trac ticket: https://core.trac.wordpress.org/ticket/65203
AI Disclosure: