[wp-trac] [WordPress Trac] #54725: Test tool and unit test improvements for 6.0
WordPress Trac
noreply at wordpress.org
Mon May 23 14:04:38 UTC 2022
#54725: Test tool and unit test improvements for 6.0
-------------------------------------------------+-------------------------
Reporter: hellofromTonya | Owner:
| hellofromTonya
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 6.0
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests fixed- | Focuses:
major dev-reviewed commit |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* owner: (none) => hellofromTonya
* status: reopened => closed
* resolution: => fixed
Comment:
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/54725#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list