[wp-trac] [WordPress Trac] #37521: Introduce a procedure for deprecating code used in Unit Tests
WordPress Trac
noreply at wordpress.org
Sat Jul 30 08:22:17 UTC 2016
#37521: Introduce a procedure for deprecating code used in Unit Tests
------------------------------+-----------------------------
Reporter: Frank Klein | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
WordPress has different utility functions to mark functions, methods,
hooks, etc. in the core codebase as deprecated, and a dedicated file
(`deprecated.php`) to move obsolete code to.
I consider that it would be useful to introduce the approach of
deprecating code to the unit tests as well.
An example for obsolete code would be the `_unregister_post_type()` and
`_unregister_taxonomy()` functions in the unit test utils. Since [36316],
these test framework functions are only wrappers for core functions. As
such, it would be appropriate to use the core functions in the tests, and
deprecate the test framework functions.
Let's explore how we could handle this in the unit test framework.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37521>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list