mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@29932 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -603,6 +603,9 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
// '[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',
|
||||
// '[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]',
|
||||
|
||||
/**
|
||||
* @expectedIncorrectUsage WP_Date_Query
|
||||
*/
|
||||
function test_bad_dates() {
|
||||
$this->go_to( '/2013/13/13/' );
|
||||
$this->assertQueryTrue( 'is_404' );
|
||||
|
||||
Reference in New Issue
Block a user