Improved unit test coverage for WP_Date_Query

- Unit tests for all publicly available functionality in WP_Date_Query
- Improve performance of date_query tests that use WP_Query

Fixes #29781


git-svn-id: https://develop.svn.wordpress.org/trunk@29793 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2014-09-29 16:04:46 +00:00
parent f6753a316a
commit fd816091a5
2 changed files with 583 additions and 4 deletions

View File

@@ -53,10 +53,12 @@ class Tests_Query_DateQuery extends WP_UnitTestCase {
public function _get_query_result( $args = array() ) {
$args = wp_parse_args( $args, array(
'post_status' => 'any', // For the future post
'posts_per_page' => '-1', // To make sure results are accurate
'orderby' => 'ID', // Same order they were created
'order' => 'ASC',
'post_status' => 'any', // For the future post
'posts_per_page' => '-1', // To make sure results are accurate
'orderby' => 'ID', // Same order they were created
'order' => 'ASC',
'update_post_meta_cache' => false,
'update_post_term_cache' => false,
) );
return $this->q->query( $args );