Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#60218 closed defect (bug) (fixed)

PHPunit test for wp_parse_id_list

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

Description


Change History (5)

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


3 years 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
3 years ago

  • Milestone Awaiting Review6.5

#3 @SergeyBiryukov
3 years ago

  • Component GeneralBuild/Test Tools

#4 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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:


3 years ago
#5

Thanks for the PR! Merged as part of r57737.

Note: See TracTickets for help on using tickets.