Make WordPress Core


Ignore:
Timestamp:
10/17/2014 12:40:06 AM (11 years ago)
Author:
boonebgorges
Message:

Add expectedIncorrectUsage flags for unit tests that generate invalid dates.

Since [29925], passing an invalid date to WP_Date_Query will generate a
_doing_it_wrong() notice. The current changeset adds the
@expectedIncorrectUsage flag to those existing unit tests that generate
invalid dates, such as those that test canonical redirect and is_404()
conditionals.

Fixes #25834.

File:
1 edited

Legend:

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

    r29765 r29932  
    574574        $this->assertFalse( $this->q->is_month );
    575575        $this->assertTrue( $this->q->is_year );
    576 
     576    }
     577
     578    /**
     579     * @ticket 10935
     580     * @expectedIncorrectUsage WP_Date_Query
     581     */
     582    public function test_query_is_date_with_bad_date() {
    577583        $this->q->query( array(
    578584            'year' => '2007',
Note: See TracChangeset for help on using the changeset viewer.