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

WordPress Trac noreply at wordpress.org
Thu Nov 30 11:15:50 UTC 2023


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

Comment (by SergeyBiryukov):

 In [changeset:"57146" 57146]:
 {{{
 #!CommitTicketReference repository="" revision="57146"
 Tests: Update `_wp_timezone_choice_usort_callback()` tests for
 consistency.

 * Use the same `@group` annotation as the other tests.
 * Use `assertSame()` to verify the type of the result.
 * Use `data_` prefix for the data provider.
 * Use named data set in the data provider. This makes the output when
 using the `--testdox` option more descriptive and is helpful when trying
 to debug which data set from a data provider failed the test.
 * Other minor corrections.

 Reference: [https://make.wordpress.org/core/handbook/testing/automated-
 testing/writing-phpunit-tests/#repetitive-tests Core Handbook: Writing PHP
 Tests: Repetitive Tests].

 Follow-up to [57145].

 See #59953, #59647.
 }}}

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


More information about the wp-trac mailing list