Changeset 55745 for trunk/tests/phpunit/tests/user/query.php
- Timestamp:
- 05/11/2023 10:05:51 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/query.php
r55562 r55745 1721 1721 */ 1722 1722 public function test_users_pre_query_filter_should_bypass_database_query() { 1723 global $wpdb;1724 1725 1723 add_filter( 'users_pre_query', array( __CLASS__, 'filter_users_pre_query' ), 10, 2 ); 1726 1724 1727 $num_queries = $wpdb->num_queries;1725 $num_queries = get_num_queries(); 1728 1726 $q = new WP_User_Query( 1729 1727 array( … … 1735 1733 1736 1734 // Make sure no queries were executed. 1737 $this->assertSame( $num_queries, $wpdb->num_queries);1735 $this->assertSame( $num_queries, get_num_queries() ); 1738 1736 1739 1737 // We manually inserted a non-existing user and overrode the results with it.
Note: See TracChangeset
for help on using the changeset viewer.