[wp-trac] [WordPress Trac] #56706: Tests: `parent::set_up()` calls `wp_list_pluck()`, causing inaccurate coverage.

WordPress Trac noreply at wordpress.org
Tue Oct 4 15:17:14 UTC 2022


#56706: Tests: `parent::set_up()` calls `wp_list_pluck()`, causing inaccurate
coverage.
----------------------------------------------+-----------------------
 Reporter:  costdev                           |       Owner:  costdev
     Type:  defect (bug)                      |      Status:  assigned
 Priority:  normal                            |   Milestone:  6.1
Component:  Build/Test Tools                  |     Version:
 Severity:  normal                            |  Resolution:
 Keywords:  has-screenshots has-patch commit  |     Focuses:
----------------------------------------------+-----------------------

Comment (by SergeyBiryukov):

 Thanks for the ticket!

 Would rewriting `reset_post_statuses()` to avoid using `get_post_stati()`
 be a better solution here?

 At a glance, it looks like `reset_post_types()` and `reset_taxonomies()`
 would also need to avoid using `get_post_types()` and `get_taxonomies()`,
 respectively, as they call `wp_filter_object_list()` as well.

 See [attachment:"56706.2.diff"].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56706#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list