[wp-trac] [WordPress Trac] #29827: Leftover taxonomies break later tests
WordPress Trac
noreply at wordpress.org
Fri Oct 10 20:25:42 UTC 2014
#29827: Leftover taxonomies break later tests
------------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.1
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+---------------------------
Changes (by boonebgorges):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"29869"]:
{{{
#!CommitTicketReference repository="" revision="29869"
Only reset taxonomies and post types between tests when running core
tests.
A growing number of plugins and other WP-based projects use the core test
tools, such as WP_UnitTestCase, as the basis of their own tests and
continuous
integration setups. At the same time, many of these third-party plugins
use
custom post types and taxonomies, which are generally registered a single
time
during a run of the tests: at 'init', before the testcases have run.
Wiping out
these globals between tests will mess with these third-party builds.
Best practice for plugin developers is probably to clean up their own post
types
and taxonomies and then reinitialize before each test. But, in the
interest of
not breaking everyone's builds, the core test suite will not enforce this.
Fixes #29827.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29827#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list