Opened 6 months ago
Last modified 6 months ago
#65201 new enhancement
Tests: Add unit tests for heartbeat_autosave()
| 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
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.
6 months 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: