[wp-trac] [WordPress Trac] #39079: REST API: Improve posts orderby tests

WordPress Trac noreply at wordpress.org
Wed Feb 1 20:30:21 UTC 2017


#39079: REST API: Improve posts orderby tests
------------------------------+-----------------------------
 Reporter:  jnylen0           |       Owner:  jnylen0
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  Future Release
Component:  REST API          |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------------
Changes (by jnylen0):

 * owner:   => jnylen0
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40037"]:
 {{{
 #!CommitTicketReference repository="" revision="40037"
 REST API: Improve posts orderby tests

 This commit adds tests for `orderby=relevance` combined with a search term
 in the REST API.

 It also improves tests for the `orderby` parameter in
 `WP_REST_Posts_Controller` by looking at the generated SQL query instead
 of creating a bunch of carefully arranged test objects.  This should be
 much more robust, and we can use this approach in other places (such as
 #39055).

 Fixes #39079.
 }}}

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


More information about the wp-trac mailing list