Repository navigation
Tests: Cover wp_heartbeat_settings() - #15791
devmuhib009 wants to merge 2 commits into
Conversation
See #65819. Props devmuhib009.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
Thanks for working on this, @devmuhib009! Clean tests for wp_heartbeat_settings() and its filter hooks.
Per #65819 comment 1521, test-only changes now need their own Trac ticket by component instead of #65819.
For wp_heartbeat_settings() in src/wp-includes/general-template.php, the component is General (or Administration).
Could you please:
- Open a new Trac ticket in General (or Administration) with
has-patchandhas-unit-testskeywords and link this PR. - Update the
Trac ticket:reference in this PR's description. - Update the
@ticket 65819annotations inwpHeartbeatSettings.phpto reflect the new ticket number.
AI Review: Gemini 3.8 Flash
See #66614. Props devmuhib009.
Verify: - Injecting the relative `ajaxurl` for frontend requests while leaving `nonce` unset when logged out. - Injecting both `ajaxurl` and a valid `heartbeat-nonce` when a user is logged in. - Preserving any custom settings keys passed into the function. Developed in #15791. Props devmuhib, huzaifaalmesbah. See #66757. git-svn-id: https://develop.svn.wordpress.org/trunk@65768 602fd350-edb4-49c9-b593-d223f7449a82
Verify: - Injecting the relative `ajaxurl` for frontend requests while leaving `nonce` unset when logged out. - Injecting both `ajaxurl` and a valid `heartbeat-nonce` when a user is logged in. - Preserving any custom settings keys passed into the function. Developed in WordPress/wordpress-develop#15791. Props devmuhib, huzaifaalmesbah. See #66757. Built from https://develop.svn.wordpress.org/trunk@65768 git-svn-id: http://core.svn.wordpress.org/trunk@64797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
Thanks for the PR! Merged in r65768. |
Description
Adds unit tests for the
wp_heartbeat_settings()function insrc/wp-includes/general-template.php.The tests cover:
ajaxurlfor frontend requests while leavingnonceunset when logged out.ajaxurland a validheartbeat-noncewhen a user is logged in.Test-only change.
Testing Instructions
Trac ticket:
https://core.trac.wordpress.org/ticket/66757
https://core.trac.wordpress.org/ticket/66614