Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#55300 closed task (blessed) (fixed)

tests for WP_List_Util::pluck and WP_List_Util::sort

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

Description

I created so test for the WP_List_Util::pluck and WP_List_Util::sort function and fixed a couple of edge cases

Change History (14)

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


3 years ago
#1

  • Keywords has-patch has-unit-tests added

Fixed a couple of edge cases

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

#2 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 6.0

#4 @costdev
2 years ago

  • Type changed from defect (bug) to task (blessed)

#5 @hellofromTonya
2 years ago

  • Milestone changed from 6.0 to 6.1
  • Owner set to hellofromTonya
  • Status changed from new to assigned

With 6.0 RC1 tomorrow, moving this ticket to 6.1. It can committed when reviewed and ready.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by costdev. View the logs.


2 years ago

#9 @costdev
2 years ago

Pinging @audrasjb and @SergeyBiryukov for review of PR 3419.

Note: Writing these tests exposed a bug in WP_List_Util::sort()/WP_List_Util::sort_callback() relating to the difference in sort order for PHP < 7 and > 7, which Core does not handle. Until this bug is fixed, or the minimum PHP version is raised to 7+, the related tests will be skipped for PHP < 7.

References:

Last edited 2 years ago by costdev (previous) (diff)

afragen commented on PR #3419:


2 years ago
#10

Awesome work and that bug is whacked.

costdev commented on PR #3419:


2 years ago
#11

Additional props to @afragen for helping investigate why the tests were failing.

#12 @audrasjb
2 years ago

Looks good to me, thanks!

#13 @audrasjb
2 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 54421:

Build/Test Tools: Add tests for WP_List_Util::pluck and WP_List_Util::sort.

This changeset adds additional unit tests for these two functions.

Props pbearne, costdev, afragen.
Fixes #55300.

Note: See TracTickets for help on using tickets.