Changeset 54785 for trunk/tests/phpunit/tests/canonical.php
- Timestamp:
- 11/10/2022 02:59:56 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/canonical.php
r53043 r54785 376 376 delete_option( 'page_on_front' ); 377 377 } 378 379 /** 380 * Ensure NOT EXISTS queries do not trigger not-countable or undefined array key errors. 381 * 382 * @ticket 55955 383 */ 384 public function test_feed_canonical_with_not_exists_query() { 385 // Set a NOT EXISTS tax_query on the global query. 386 $global_query = $GLOBALS['wp_query']; 387 $GLOBALS['wp_query'] = new WP_Query( 388 array( 389 'post_type' => 'post', 390 'tax_query' => array( 391 array( 392 'taxonomy' => 'post_format', 393 'operator' => 'NOT EXISTS', 394 ), 395 ), 396 ) 397 ); 398 399 $url = redirect_canonical( get_term_feed_link( self::$terms['/category/parent/'] ), false ); 400 // Restore original global. 401 $GLOBALS['wp_query'] = $global_query; 402 403 $this->assertNull( $url ); 404 } 378 405 }
Note: See TracChangeset
for help on using the changeset viewer.