diff --git tests/phpunit/tests/query/dateQuery.php tests/phpunit/tests/query/dateQuery.php
index 2f94c4a..735a149 100644
|
|
|
class Tests_Query_DateQuery extends WP_UnitTestCase { |
| 287 | 287 | $this->assertEquals( $expected_dates, wp_list_pluck( $posts, 'post_date' ) ); |
| 288 | 288 | } |
| 289 | 289 | |
| | 290 | /** |
| | 291 | * @ticket 29908 |
| | 292 | */ |
| | 293 | public function test_inclusive_before_with_ymd_date() { |
| | 294 | $p1 = $this->factory->post->create( array( |
| | 295 | 'post_date' => '2008-05-06 13:00:00', |
| | 296 | ) ); |
| | 297 | $p2 = $this->factory->post->create( array( |
| | 298 | 'post_date' => '2008-05-07 13:00:00', |
| | 299 | ) ); |
| | 300 | |
| | 301 | $posts = $this->_get_query_result( array( |
| | 302 | 'date_query' => array( |
| | 303 | 'before' => '2008-05-07', |
| | 304 | 'inclusive' => true |
| | 305 | ), |
| | 306 | ) ); |
| | 307 | |
| | 308 | $this->assertTrue( in_array( $p2, wp_list_pluck( $posts, 'ID' ) ) ); |
| | 309 | } |
| | 310 | |
| 290 | 311 | public function test_date_query_year_expecting_results() { |
| 291 | 312 | $posts = $this->_get_query_result( array( |
| 292 | 313 | 'date_query' => array( |