diff --git a/tests/phpunit/tests/date/query.php b/tests/phpunit/tests/date/query.php index 3ce905a291..99c6ca5389 100644 --- a/tests/phpunit/tests/date/query.php +++ b/tests/phpunit/tests/date/query.php @@ -975,8 +975,8 @@ class Tests_WP_Date_Query extends WP_UnitTestCase { * @ticket 31001 */ public function test_validate_date_values_should_process_array_value_for_year() { - $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12' ) ); - $p2 = $this->factory->post->create( array( 'post_date' => '2013-01-12' ) ); + $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12 00:00:00' ) ); + $p2 = $this->factory->post->create( array( 'post_date' => '2013-01-12 00:00:00' ) ); $q = new WP_Query( array( 'date_query' => array( @@ -995,8 +995,8 @@ class Tests_WP_Date_Query extends WP_UnitTestCase { * @ticket 31001 */ public function test_validate_date_values_should_process_array_value_for_day() { - $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12' ) ); - $p2 = $this->factory->post->create( array( 'post_date' => '2015-01-10' ) ); + $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12 00:00:00' ) ); + $p2 = $this->factory->post->create( array( 'post_date' => '2015-01-10 00:00:00' ) ); $q = new WP_Query( array( 'date_query' => array( @@ -1016,8 +1016,8 @@ class Tests_WP_Date_Query extends WP_UnitTestCase { * @expectedIncorrectUsage WP_Date_Query */ public function test_validate_date_values_should_process_array_value_for_day_when_values_are_invalid() { - $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12' ) ); - $p2 = $this->factory->post->create( array( 'post_date' => '2015-01-10' ) ); + $p1 = $this->factory->post->create( array( 'post_date' => '2015-01-12 00:00:00' ) ); + $p2 = $this->factory->post->create( array( 'post_date' => '2015-01-10 00:00:00' ) ); $q = new WP_Query( array( 'date_query' => array(