[wp-trac] [WordPress Trac] #38693: REST API: Audit `orderby` params and add any others
WordPress Trac
noreply at wordpress.org
Tue Nov 29 16:51:44 UTC 2016
#38693: REST API: Audit `orderby` params and add any others
--------------------------------------+--------------------
Reporter: jnylen0 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------
Changes (by jnylen0):
* keywords: needs-patch => has-patch has-unit-tests
* milestone: Awaiting Review => 4.7
Comment:
Thanks for patching this, @ChopinBach. Looks good to me apart from a
couple of minor notes.
A few of the new tests don't have strictly defined order:
- `test_get_items_orderby_author_query`
- `test_get_items_orderby_none_query`
- `test_get_items_orderby_parent_query`
For `none` it's fine to just assert that the response is a 200. For the
others, you could either verify that the list of authors/parents is sorted
correctly, or make sure each post has a unique author/parent.
Also, rather than copy/paste `update_post_modified` from
`tests/query/dateQuery.php`, let's move it to the base `WP_UnitTestCase`
class.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38693#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list