#29781 closed enhancement (fixed)
Unit tests for WP_Date_Query
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Date/Time | Keywords: | |
Focuses: | Cc: |
Description
WP_Date_Query
has pretty decent integration tests (in the form of the posts queries in /tests/phpunit/tests/query/dateQuery.php
, but it has no coverage at all of the class itself. The attached patch covers pretty much all publicly available functionality in WP_Date_Query
.
In writing the tests, I found a couple bugs - places where passing a certain kind of value can result in getting integer-cast to 1, which will return improper results rather than no results at all. But for this patch, I've opted to write all the tests so that they pass, ie so that they describe how WP_Date_Query
currently works. I'll submit fixes for the bugs once these tests have been committed.
Attachments (2)
Change History (8)
Note: See
TracTickets for help on using
tickets.
Never mind that first patch. Forgot how to use git for a second.