Opened 13 hours ago
Last modified 13 hours ago
#65180 new feature request
Tests: Add unit tests for wp_reset_vars()
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Description
This ticket adds unit tests for the wp_reset_vars() function in wp-admin/includes/misc.php. This function resets global variables based on $_GET and $_POST values.
Change History (1)
This ticket was mentioned in PR #11737 on WordPress/wordpress-develop by @pbearne.
13 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_reset_vars()function inwp-admin/includes/misc.php. These tests ensure that the function correctly resets global variables based on the values in$_POSTand$_GET, or defaults them to an empty string.The tests cover:
$_POSTwhen they are not empty.$_GETwhen they are empty in$_POST(including cases like'0'or'').$_POSTand$_GET.Trac ticket: https://core.trac.wordpress.org/ticket/65180
AI Disclosure: