Changeset 55745 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 05/11/2023 10:05:51 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r55562 r55745 556 556 */ 557 557 public function test_posts_pre_query_filter_should_bypass_database_query() { 558 global $wpdb;559 560 558 add_filter( 'posts_pre_query', array( __CLASS__, 'filter_posts_pre_query' ) ); 561 559 562 $num_queries = $wpdb->num_queries;560 $num_queries = get_num_queries(); 563 561 $q = new WP_Query( 564 562 array( … … 570 568 remove_filter( 'posts_pre_query', array( __CLASS__, 'filter_posts_pre_query' ) ); 571 569 572 $this->assertSame( $num_queries, $wpdb->num_queries);570 $this->assertSame( $num_queries, get_num_queries() ); 573 571 $this->assertSame( array( 12345 ), $q->posts ); 574 572 }
Note: See TracChangeset
for help on using the changeset viewer.