[wp-trac] [WordPress Trac] #33888: WP Test Suite utils: is_post_type_viewable() is used, but might not be defined

WordPress Trac noreply at wordpress.org
Tue Sep 15 19:38:02 UTC 2015


#33888: WP Test Suite utils: is_post_type_viewable() is used, but might not be
defined
------------------------------+-----------------------------
 Reporter:  tyxla             |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:  trunk
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 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 [33666]), 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 [34215], a
 little more than an hour ago.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33888>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list