[wp-trac] [WordPress Trac] #25818: `WP_UnitTestCase::go_to()` drops query vars

WordPress Trac noreply at wordpress.org
Mon Nov 4 22:46:45 UTC 2013


#25818: `WP_UnitTestCase::go_to()` drops query vars
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  3.8
Component:  Unit Tests      |     Version:  trunk
 Severity:  normal          |  Resolution:  fixed
 Keywords:                  |
----------------------------+-----------------------------
Changes (by wonderboymusic):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"26006"]:
 {{{
 #!CommitTicketReference repository="" revision="26006"
 `WP_UnitTestCase::go_to()` tried its best to clean up global space, but
 ultimately fell short. Because it was blowing away `WP` every time it was
 called, it was dropping all the query vars that were registered for custom
 taxonomies and custom post types (ouch).

 Introduces `_cleanup_query_vars()`. This is a prerequisite for the unit
 tests on #20767. All unit tests pass with this change.

 See #20767.
 Fixes #25818.
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25818#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list