Thanks to visit codestin.com
Credit goes to core.trac.wordpress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#65237 new enhancement

Tests: Add unit tests for wp_ajax_fetch_list()

Reported by: pbearne's profile pbearne Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch has-unit-tests
Focuses: tests Cc:

Description

This ticket aims to add unit test coverage for the wp_ajax_fetch_list() function in src/wp-admin/includes/ajax-actions.php, which handles fetching list tables via AJAX.

Change History (1)

This ticket was mentioned in PR #11827 on WordPress/wordpress-develop by @pbearne.


6 weeks ago
#1

  • Keywords has-patch has-unit-tests added

This PR adds unit test coverage for the wp_ajax_fetch_list() function in src/wp-admin/includes/ajax-actions.php. These tests verify the ability to fetch list tables via AJAX, including:

  • Successful fetching of empty lists and lists with items.
  • Proper handling of invalid nonces.
  • Proper handling of invalid list table classes.
  • Access control for unprivileged users.

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

AI Disclosure:

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