Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#60217 closed task (blessed) (fixed)

phpUnit test for wp_parse_slug_list

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

Description


Change History (6)

#1 @pbearne
3 years ago

  • Summary phpUnit test for wp_list_pluckphpUnit test for wp_parse_slug_list

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


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

  • Milestone Awaiting Review6.5
  • Type defect (bug)task (blessed)

#4 @swissspidy
3 years ago

  • Owner set to swissspidy
  • Resolutionfixed
  • Status newclosed

In 57725:

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

Props pbearne.
Fixes #60217.

#6 @SergeyBiryukov
3 years 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.