Make WordPress Core

Opened 8 years ago

Last modified 5 weeks ago

#37521 new enhancement

Introduce a procedure for deprecating code used in Unit Tests

Reported by: frank-klein's profile Frank Klein Owned by:
Milestone: Future Release 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.

Change History (1)

#1 @desrosj
5 weeks ago

  • Milestone changed from Awaiting Review to Future Release

This seems like a good suggestion to me. If someone wants to take a pass at figuring out what this could look like, then it can be considered. Perhaps starting with a Make Core proposal would be best.

Note: See TracTickets for help on using tickets.