[wp-trac] [WordPress Trac] #37008: Unit test for the remove_query_arg method

WordPress Trac noreply at wordpress.org
Fri Jun 3 04:29:13 UTC 2016


#37008: Unit test for the remove_query_arg method
--------------------------------------+---------------------------
 Reporter:  borgesbruno               |       Owner:  boonebgorges
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.6
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => assigned
 * milestone:  Awaiting Review => 4.6


Comment:

 Thanks, @borgesbruno! It is indeed a noble purpose :)

 A couple of minor notes about formatting and convention:

 - I'm going to move these tests to their own file
 - The argument format for the dataProvider seems backward to me, so I'm
 going to change it to match the syntax of the function more closely
 - You've provided error messages, but they're not really descriptive. We
 generally don't give error messages like this unless they're useful enough
 to help debug without opening the test files
 - It seems to me that the core functionality of `remove_query_arg()` can
 be more succinctly tested by passing in an explicit URL. It's worthwhile
 to test that the current URL is used as a fallback, but I think it should
 happen in a separate test
 - No need for a `@ticket` annotation if the tests being introduced don't
 demonstrate a bug or a bugfix

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37008#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list