Skip to content

Tests: Add unit tests for wp_ajax_get_permalink()#11906

Open
pbearne wants to merge 3 commits into
WordPress:trunkfrom
pbearne:65252-ajax-actions-get_permalink
Open

Tests: Add unit tests for wp_ajax_get_permalink()#11906
pbearne wants to merge 3 commits into
WordPress:trunkfrom
pbearne:65252-ajax-actions-get_permalink

Conversation

@pbearne
Copy link
Copy Markdown

@pbearne pbearne commented May 20, 2026

This PR adds unit tests for the wp_ajax_get_permalink() function located in src/wp-admin/includes/ajax-actions.php.

The tests cover:

  • Successful retrieval of a post permalink.
  • Proper handling of invalid nonces (getpermalink nonce).
  • Behavior when the post_id parameter is missing.

Trac ticket: https://core.trac.wordpress.org/ticket/65252

AI Disclosure:

  • AI assistance: Yes
  • Tool(s): Junie (JetBrains)
  • Model(s): gemini-3-flash-preview
  • Used for: Code analysis, test implementation, and workflow management.

Co-authored-by: Junie <junie@jetbrains.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pbearne.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant