Changeset 34997 for trunk/tests/phpunit/tests/term/cache.php
- Timestamp:
- 10/10/2015 01:58:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/cache.php
r30954 r34997 104 104 105 105 $term_object = get_term( $term, 'wptests_tax' ); 106 wp_cache_delete( $term, ' wptests_tax' );106 wp_cache_delete( $term, 'terms' ); 107 107 108 108 // Affirm that the cache is empty. 109 $this->assertEmpty( wp_cache_get( $term, ' wptests_tax' ) );109 $this->assertEmpty( wp_cache_get( $term, 'terms' ) ); 110 110 111 111 $num_queries = $wpdb->num_queries; … … 129 129 ) ); 130 130 131 wp_cache_delete( $term, ' wptests_tax' );131 wp_cache_delete( $term, 'terms' ); 132 132 133 133 // Affirm that the cache is empty. 134 $this->assertEmpty( wp_cache_get( $term, ' wptests_tax' ) );134 $this->assertEmpty( wp_cache_get( $term, 'terms' ) ); 135 135 136 136 $num_queries = $wpdb->num_queries; … … 138 138 // Prime cache. 139 139 $term_object = get_term( $term, 'wptests_tax' ); 140 $this->assertNotEmpty( wp_cache_get( $term, ' wptests_tax' ) );140 $this->assertNotEmpty( wp_cache_get( $term, 'terms' ) ); 141 141 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 142 142 … … 156 156 ) ); 157 157 158 wp_cache_delete( $term, ' wptests_tax' );158 wp_cache_delete( $term, 'terms' ); 159 159 160 160 // Affirm that the cache is empty. 161 $this->assertEmpty( wp_cache_get( $term, ' wptests_tax' ) );161 $this->assertEmpty( wp_cache_get( $term, 'terms' ) ); 162 162 163 163 $num_queries = $wpdb->num_queries; … … 165 165 // Prime cache. 166 166 $term_object = get_term_by( 'id', $term, 'wptests_tax' ); 167 $this->assertNotEmpty( wp_cache_get( $term, ' wptests_tax' ) );167 $this->assertNotEmpty( wp_cache_get( $term, 'terms' ) ); 168 168 $this->assertSame( $num_queries + 1, $wpdb->num_queries ); 169 169
Note: See TracChangeset
for help on using the changeset viewer.