Changeset 55745 for trunk/tests/phpunit/tests/option/wpLoadAlloptions.php
- Timestamp:
- 05/11/2023 10:05:51 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/wpLoadAlloptions.php
r55256 r55745 35 35 */ 36 36 public function test_if_alloptions_are_retrieved_from_cache() { 37 global $wpdb; 38 $before = $wpdb->num_queries; 37 $before = get_num_queries(); 39 38 wp_load_alloptions(); 40 $after = $wpdb->num_queries;39 $after = get_num_queries(); 41 40 42 41 // Database has not been hit. … … 50 49 */ 51 50 public function test_if_alloptions_are_retrieved_from_database() { 52 global $wpdb;53 54 51 // Delete the existing cache first. 55 52 wp_cache_delete( 'alloptions', 'options' ); 56 53 57 $before = $wpdb->num_queries;54 $before = get_num_queries(); 58 55 wp_load_alloptions(); 59 $after = $wpdb->num_queries;56 $after = get_num_queries(); 60 57 61 58 // Database has been hit.
Note: See TracChangeset
for help on using the changeset viewer.