Opened 3 weeks ago
Last modified 3 weeks ago
#65243 new enhancement
Test: Add unit tests for wp_ajax_rest_nonce()
| 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 wp_ajax_rest_nonce() in src/wp-admin/includes/ajax-actions.php currently lacks unit test coverage. This task involves adding tests to verify that it correctly returns a REST API nonce for logged-in users and is inaccessible to logged-out users.
Change History (1)
This ticket was mentioned in PR #11837 on WordPress/wordpress-develop by @pbearne.
3 weeks ago
#1
- Keywords has-patch has-unit-tests added
Note: See
TracTickets for help on using
tickets.
This PR adds unit test coverage for the
wp_ajax_rest_nonce()function, ensuring it correctly generates a valid REST API nonce for authenticated users and remains inaccessible to unauthenticated users.Trac ticket: https://core.trac.wordpress.org/ticket/65243
AI Disclosure: