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

WordPress Trac noreply at wordpress.org
Sun Sep 18 13:08:47 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:"54198" 54198]:
 {{{
 #!CommitTicketReference repository="" revision="54198"
 Tests: Move the basic `get_block_templates()` test to the dedicated file.

 Now that the function has its own test class, the remaining test from
 `Tests_Block_Template_Utils` can be moved to
 `Tests_Blocks_GetBlockTemplates` for consistency.

 Includes:
 * Uncommenting some assertions previously commented out.
 * Moving the `get_template_ids()` helper method to the top of the class.
 * Standardizing on `wpSetUpBeforeClass()`/`wpTearDownAfterClass()` in both
 classes.
 * Declaring the test theme name as a constant in both classes, since the
 value is not changed by any of the tests.
 * Renaming some properties in both classes for clarity.

 Follow-up to [51003], [52062], [53927], [54184], [54187].

 See #55652.
 }}}

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


More information about the wp-trac mailing list