Opened 7 years ago
Last modified 5 years ago
#37521 new enhancement
Introduce a procedure for deprecating code used in Unit Tests
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Build/Test Tools | Keywords: | |
Focuses: | Cc: |
Description
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.
Note: See
TracTickets for help on using
tickets.