[wp-trac] [WordPress Trac] #55918: Call wpTearDownAfterClass() before deleting all data, instead of after

WordPress Trac noreply at wordpress.org
Sat Jun 4 15:04:12 UTC 2022


#55918: Call wpTearDownAfterClass() before deleting all data, instead of after
--------------------------------------+---------------------
 Reporter:  SergeyBiryukov            |       Owner:  (none)
     Type:  defect (bug)              |      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):

 The PR also moves the calls to parent methods in `WP_UnitTestCase_Base`:

 * `parent::set_up_before_class()` to be the first thing called in
 `::set_up_before_class()`
 * `parent::tear_down_after_class()` to be the last thing called in
 `::tear_down_after_class()`

 This does not have any effect in practice, but brings consistency with how
 these methods are called in the test suite.

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


More information about the wp-trac mailing list