Make WordPress Core

Opened 3 months ago

Closed 7 weeks ago

Last modified 7 weeks ago

#60218 closed defect (bug) (fixed)

PHPunit test for wp_parse_id_list

Reported by: pbearne's profile pbearne Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description


Change History (5)

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


3 months ago
#1

  • Keywords has-patch has-unit-tests added

A new PHPUnit test file for the 'wp_parse_id_list' function is introduced. It includes various scenarios ranging from plain numbers, strings with spaces, and HTML to strings with commas. This is crucial to guarantee the function's accurate response to a variety of inputs, enhancing software reliability and stability.

#2 @SergeyBiryukov
7 weeks ago

  • Milestone changed from Awaiting Review to 6.5

#3 @SergeyBiryukov
7 weeks ago

  • Component changed from General to Build/Test Tools

#4 @SergeyBiryukov
7 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 57737:

Tests: Expand wp_parse_id_list() unit tests.

Includes:

  • Moving pre-existing wp_parse_id_list() tests to their own file.
  • Merging new and pre-existing wp_parse_slug_list() tests.
  • Using named data provider in wp_parse_list() tests.

Follow-up to [25170], [40044], [44546], [57284], [57725].

Props pbearne, mukesh27, SergeyBiryukov.
Fixes #60218. See #60217, #59647.

@SergeyBiryukov commented on PR #5851:


7 weeks ago
#5

Thanks for the PR! Merged as part of r57737.

Note: See TracTickets for help on using tickets.