Changeset 55745 for trunk/tests/phpunit/tests/post/getPostClass.php
- Timestamp:
- 05/11/2023 10:05:51 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/getPostClass.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getPostClass.php
r51568 r55745 122 122 */ 123 123 public function test_taxonomy_classes_hit_cache() { 124 global $wpdb;125 126 124 register_taxonomy( 'wptests_tax', 'post' ); 127 125 wp_set_post_terms( $this->post_id, array( 'foo', 'bar' ), 'wptests_tax' ); … … 132 130 update_meta_cache( 'post', $this->post_id ); 133 131 134 $num_queries = $wpdb->num_queries;132 $num_queries = get_num_queries(); 135 133 136 134 $found = get_post_class( '', $this->post_id ); 137 135 138 $this->assertSame( $num_queries, $wpdb->num_queries);136 $this->assertSame( $num_queries, get_num_queries() ); 139 137 } 140 138 }
Note: See TracChangeset
for help on using the changeset viewer.