Changeset 51276 for trunk/tests/phpunit/tests/query/invalidQueries.php
- Timestamp:
- 06/30/2021 04:59:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/invalidQueries.php
r49902 r51276 100 100 101 101 /** 102 * Test WP Query with an invalid post type in a mutiple post type query. 103 * 104 * @ticket 48556 105 */ 106 public function test_unregistered_post_type_wp_query_multiple_post_types() { 107 global $wpdb; 108 109 $query = new WP_Query( 110 array( 111 'post_type' => array( 'unregistered_cpt', 'page' ), 112 ) 113 ); 114 $posts = $query->get_posts(); 115 116 $this->assertContains( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request ); 117 $this->assertCount( 1, $posts, 'the valid `page` post type should still return one post' ); 118 } 119 120 /** 102 121 * Test WP Query with an invalid post type specified in the URL. 103 122 *
Note: See TracChangeset
for help on using the changeset viewer.