Opened 7 years ago
Last modified 7 years ago
#42714 new defect (bug)
Unit tests: Move remaining classes out of includes/utils.php into their own file
Reported by: | Frank Klein | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
The includes/utils.php
file includes four classes:
MockAction
testXMLParser
MockClass
wpdb_exposed_methods_for_testing
The patch moves these classes into their own files, as this makes the code more transparent, and easier to add documentation.
The files are now loaded during bootstrap. Moving classes out of files can lead to issues, as seen in #37523.
Rather than continue loading these files always in includes/utils.php
, one way to get around this is to check for these classes being loaded at the top utils.php
. If not, they can be loaded, and an error message can be triggered, so that developers can update their code.
This backwards compatibility layer could then be removed after having it there for one major release.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.