[wp-trac] [WordPress Trac] #55643: Backport updates of Comment blocks tests

WordPress Trac noreply at wordpress.org
Mon May 23 14:04:38 UTC 2022


#55643: Backport updates of Comment blocks tests
---------------------------------------------+-----------------------------
 Reporter:  darerodz                         |       Owner:  hellofromTonya
     Type:  task (blessed)                   |      Status:  closed
 Priority:  normal                           |   Milestone:  6.0
Component:  Editor                           |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------

Comment (by hellofromTonya):

 In [changeset:"53432" 53432]:
 {{{
 #!CommitTicketReference repository="" revision="53432"
 Build/Test Tools: Add tests and fix comments odd/even instabilities (test
 leaks).

 [53353] Add unit test for Comment Template block.

 [53353] The odd / even class attribute global variables are causing issues
 in comments tests when a new test is added or an existing test is
 modified. To stabilize the odd / even comment tests, the comment global
 variables are added to the base test class' tear_down() using the same
 patterns as the other global resets. This change ensures each comment test
 starts at the same state. In doing so, the expected odd / even class
 attributes are no longer affected by previous tests, i.e. test leaks.

 Also moves the comment globals reset from the base test case to the test's
 `tear_down()`. Why? To avoid risks to extenders' tests as it's too late in
 the 6.0 cycle for a dev note.

 Follow-up to [53298], [53172], [53138].

 Props bernhard-reiter, darerodz, gziolo, hellofromTonya, zieladam,
 peterwilsoncc.
 Merges [53353] and [53430] to the 6.0 branch.
 Fixes #54725,#55643.
 }}}

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


More information about the wp-trac mailing list