Opened 5 weeks ago
Last modified 5 weeks ago
#53987 new enhancement
add tests for wp_list_filter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Change History (11)
This ticket was mentioned in PR #1614 on WordPress/wordpress-develop by pbearne.
5 weeks ago
- Keywords has-patch has-unit-tests added
#2
@
5 weeks ago
removed duplicate code in https://core.trac.wordpress.org/ticket/53988
#4
@
5 weeks ago
Thanks for the PR!
Just noting there also some existing tests for wp_list_filter()
in tests/functions/wpListUtil.php
.
It looks like:
wpListFilter.php
has tests forwp_filter_object_list()
andwp_list_pluck()
.wpListUtil.php
has tests forwp_list_pluck()
,wp_list_filter()
,wp_list_sort()
, and theWP_List_Util
class.
This could probably use some reorganization for clarity and to make sure the tests are not duplicated.
#11
@
5 weeks ago
What's left here:
- See if
wp_list_pluck()
tests can be simplified further. Some use older fixtures and some use a data provider, so we could review the older fixtures and move them to the data provider too if it does not cover those cases yet. - See if any additional tests for
wp_list_filter()
are necessary and not already covered by the data provider.
Note: See
TracTickets for help on using
tickets.
wpListeFilter.php claimed to test wp_list_filter but had no tests for it so I have added them
Trac ticket: https://core.trac.wordpress.org/ticket/53987