Opened 5 weeks ago
Last modified 5 weeks ago
#65201 new enhancement
Tests: Add unit tests for heartbeat_autosave()
| 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 heartbeat_autosave() function in wp-admin/includes/misc.php. These tests will verify that the function correctly triggers wp_autosave() and returns the appropriate Heartbeat response for success, error, and empty states.
Change History (1)
This ticket was mentioned in PR #11762 on WordPress/wordpress-develop by @pbearne.
5 weeks 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
heartbeat_autosave()function inwp-admin/includes/misc.php. These tests ensure that the function correctly processes Heartbeat data to trigger post autosaves, and returns the appropriate response messages for success, error, and empty states.The tests cover:
wp_autosavedata is provided.WP_Errorreturned bywp_autosave().Trac ticket: https://core.trac.wordpress.org/ticket/65201
AI Disclosure: