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

WordPress Trac noreply at wordpress.org
Tue Jul 16 18:38:01 UTC 2024


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

Comment (by hellofromTonya):

 In [changeset:"58739" 58739]:
 {{{
 #!CommitTicketReference repository="" revision="58739"
 Tests: Use data provider in
 Tests_Interactivity_API_wpInteractivityAPIFunctions.

 Refactors the following tests to use a data provider with named test
 cases:
 * `test_wp_interactivity_data_wp_context_with_different_arrays()`
 *
 `test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace()`
 * `test_wp_interactivity_data_wp_context_with_json_flags()`

 This is better as:
 1. One failing test will not block the other tests from running.
 2. Each test is now referenced by name in any error message, making it
 more straight forward to see which test failed.
 3. The test no longer contains multiple assertions.
 3. It makes it more straight forward to add additional tests.

 Follow-up to [58594], [58234], [57762], [57743], [57742], [57563].

 Props jrf.
 See #61530.
 }}}

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


More information about the wp-trac mailing list