Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 6 weeks ago

#55300 closed task (blessed) (fixed)

tests for WP_List_Util::pluck and WP_List_Util::sort

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

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 (15)

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


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

  • Milestone Awaiting Review → 6.0

#4 @costdev
5 years ago

  • Type defect (bug) → task (blessed)

#5 @hellofromTonya
5 years ago

  • Milestone 6.0 → 6.1
  • Owner set to hellofromTonya
  • Status new → 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.


4 years ago

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


4 years ago

#9 @costdev
4 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 4 years ago by costdev (previous) (diff)

​afragen commented on ​PR #3419:


4 years ago
#10

Awesome work and that bug is whacked.

​costdev commented on ​PR #3419:


4 years ago
#11

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

#12 @audrasjb
4 years ago

Looks good to me, thanks!

#13 @audrasjb
4 years ago

  • Resolution → fixed
  • Status assigned → 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.

​@mukesh27 commented on ​PR #2371:


6 weeks ago
#15

Thanks @pbearne for the PR!

That associated ticket is already marked as committed in 6.1 milestone.

Mark this PR as close, Feel free to re-open if any follow-up work needed.

Note: See TracTickets for help on using tickets.