[wp-trac] [WordPress Trac] #55652: Test tool and unit test improvements for 6.1

WordPress Trac noreply at wordpress.org
Fri Sep 2 01:14:43 UTC 2022


#55652: Test tool and unit test improvements for 6.1
--------------------------------------+---------------------
 Reporter:  hellofromTonya            |       Owner:  (none)
     Type:  task (blessed)            |      Status:  new
 Priority:  normal                    |   Milestone:  6.1
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by SergeyBiryukov):

 In [changeset:"54061" 54061]:
 {{{
 #!CommitTicketReference repository="" revision="54061"
 Tests: Simplify and correct `get_term_link()` and `get_edit_term_link()`
 tests:

 * Some assertions were unnecessarily duplicated. They aim to test the
 function behavior both when passing a term ID and term object, however
 that is already handled via the `$use_id` parameter of the `get_term()`
 helper in the same test class. The data providers already supply test
 cases both with a term ID and term object, so there is no need for a
 second assertion or a whole second test method with a term object.
 * One `get_term_feed_link()` test was unnecessarily skipped half of the
 time, when term object was passed instead of term ID. Instead, it can use
 a dedicated data provider and avoid skipping.

 Includes:
 * Using more descriptive test method names to clarify the intention of the
 tests.
 * Some documentation updates for clarity.

 Follow-up to [52180], [52255], [52258], [52305], [53833], [53836].

 See #55652.
 }}}

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


More information about the wp-trac mailing list