Changeset 51462 for trunk/tests/phpunit/tests/query/invalidQueries.php
- Timestamp:
- 07/19/2021 02:00:11 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/invalidQueries.php
r51276 r51462 94 94 $posts = $query->get_posts(); 95 95 96 $this->assert Contains( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request );97 $this->assert Contains( "{$wpdb->posts}.post_status = 'publish'", self::$last_posts_request );96 $this->assertStringContainsString( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request ); 97 $this->assertStringContainsString( "{$wpdb->posts}.post_status = 'publish'", self::$last_posts_request ); 98 98 $this->assertCount( 0, $posts ); 99 99 } … … 114 114 $posts = $query->get_posts(); 115 115 116 $this->assert Contains( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request );116 $this->assertStringContainsString( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request ); 117 117 $this->assertCount( 1, $posts, 'the valid `page` post type should still return one post' ); 118 118 } … … 128 128 $this->go_to( home_url( '?post_type=unregistered_cpt' ) ); 129 129 130 $this->assert Contains( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request );131 $this->assert Contains( "{$wpdb->posts}.post_status = 'publish'", self::$last_posts_request );130 $this->assertStringContainsString( "{$wpdb->posts}.post_type = 'unregistered_cpt'", self::$last_posts_request ); 131 $this->assertStringContainsString( "{$wpdb->posts}.post_status = 'publish'", self::$last_posts_request ); 132 132 // $wp_query recovers to the post type "post" and is expected to return one. 133 133 $this->assertCount( 1, $wp_query->get_posts() );
Note: See TracChangeset
for help on using the changeset viewer.