WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/09/2015 04:32:59 PM (4 years ago)
Author:
boonebgorges
Message:

Ensure that WP_Date_Query accepts a value of 0 for 'hour'.

Props jim912.
Fixes #34228.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/date/query.php

    r31251 r34989  
    509509    }
    510510
     511    /**
     512     * @ticket 34228
     513     */
     514    public function test_build_time_query_should_not_discard_hour_0() {
     515        $q = new WP_Date_Query( array() );
     516
     517        $found = $q->build_time_query( 'post_date', '=', 0, 10 );
     518
     519        $this->assertContains( '%H', $found );
     520    }
     521
    511522    public function test_build_time_query_compare_in() {
    512523        $q = new WP_Date_Query( array() );
Note: See TracChangeset for help on using the changeset viewer.