Opened 3 years ago
Last modified 3 years ago
#53987 new enhancement
add tests for wp_list_filter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Change History (16)
This ticket was mentioned in PR #1614 on WordPress/wordpress-develop by pbearne.
3 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@
3 years ago
removed duplicate code in https://core.trac.wordpress.org/ticket/53988
#4
@
3 years 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
@
3 years 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.
hellofromtonya commented on PR #1614:
3 years ago
#12
Good work here @pbearne. Can you rebase with master
to resolve the merge conflict. Then it should be ready.
#15
@
3 years ago
- Milestone changed from 5.9 to Future Release
Today is 5.9 Feature Freeze. I'll punt this to Future Release (as 6.0 isn't
available yet for selection).
Test and build tool changes are allowed after feature freeze up until RC. If someone is able to work on this before then, it can always be moved back.
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