[wp-trac] [WordPress Trac] #30017: Many automated tests are unnecessarily slow
WordPress Trac
noreply at wordpress.org
Thu Oct 15 04:43:40 UTC 2015
#30017: Many automated tests are unnecessarily slow
------------------------------+--------------------------
Reporter: boonebgorges | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.4
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
------------------------------+--------------------------
Comment (by wonderboymusic):
In [changeset:"35186"]:
{{{
#!CommitTicketReference repository="" revision="35186"
Unit Tests: implement `setUpBeforeClass()` and `tearDownAfterClass()` on
`WP_UnitTestCase`. Use late static binding (plus a gross fallback for PHP
5.2) to check if `wpSetUpBeforeClass()` or `wpTearDownAfterClass()` exist
on the called class, and then call it and pass a static
`WP_UnitTest_Factory` instance via Dependency Injection, if it exists.
This makes it way easier to add fixtures, and tear them down, without
needing to instantiate `WP_UnitTest_Factory` in every class - removes the
need to call `commit_transaction()` in each individual class.
See #30017, #33968.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30017#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list