WP Test Suite utils: is_post_type_viewable() is used, but might not be defined
|Reported by:||tyxla||Owned by:|
In _cleanup_query_vars() in the WordPress test suite utils.php, the is_post_type_viewable() function is used to assure that only the viewable post type query vars are added.
This is fine and makes perfect sense, but since is_post_type_viewable() is a new function (introduced in ), it is not available in 4.3 and older versions. This basically ruins backward compatibility, and prevents testing 4.3 and older versions.
This is particularly an issue if running tests for a WordPress plugin or theme with any CI tool (like Travis) and testing with the following env config in .travis.yml:
env: - WP_VERSION=4.3 WP_MULTISITE=0 - WP_VERSION=4.2 WP_MULTISITE=0 - WP_VERSION=4.1 WP_MULTISITE=0 - WP_VERSION=4.0 WP_MULTISITE=0
The problematic modification appears to have been introduced in , a little more than an hour ago.
Change History (5)
- Keywords close added; reporter-feedback removed
- Resolution set to invalid
- Status changed from new to closed