Make WordPress Core


Ignore:
Timestamp:
10/17/2014 12:40:06 AM (10 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/conditionals.php

    r29039 r29932  
    604604    // '[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
    605605
     606    /**
     607     * @expectedIncorrectUsage WP_Date_Query
     608     */
    606609    function test_bad_dates() {
    607610        $this->go_to( '/2013/13/13/' );
Note: See TracChangeset for help on using the changeset viewer.