Make WordPress Core

Opened 4 months ago

Closed 2 months ago

Last modified 8 weeks ago

#60217 closed task (blessed) (fixed)

phpUnit test for wp_parse_slug_list

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

Description


Change History (6)

#1 @pbearne
4 months ago

  • Summary changed from phpUnit test for wp_list_pluck to phpUnit test for wp_parse_slug_list

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


4 months ago
#2

  • Keywords has-patch has-unit-tests added

A new phpunit test file is added specifically for testing the 'wp_parse_slug_list' function. Different scenarios are covered including handling of plain numbers, strings with spaces, strings with commas, and HTML. This ensures that the function responds correctly to a wide array of inputs, improving overall software reliability and stability.

#3 @swissspidy
2 months ago

  • Milestone changed from Awaiting Review to 6.5
  • Type changed from defect (bug) to task (blessed)

#4 @swissspidy
2 months ago

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

In 57725:

Build/Test Tools: Add unit tests for wp_parse_slug_list().

Props pbearne.
Fixes #60217.

#6 @SergeyBiryukov
8 weeks ago

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.

Note: See TracTickets for help on using tickets.