| @@ 2187-2201 (lines=15) @@ | ||
| 2184 | /** |
|
| 2185 | * @ticket 35677 |
|
| 2186 | */ |
|
| 2187 | public function test_cache_should_be_sensitive_to_parent__in() |
|
| 2188 | { |
|
| 2189 | global $wpdb; |
|
| 2190 | ||
| 2191 | $q1 = new WP_Comment_Query( |
|
| 2192 | array( |
|
| 2193 | 'parent__in' => array( 1, 2, 3 ), |
|
| 2194 | ) |
|
| 2195 | ); |
|
| 2196 | ||
| 2197 | $num_queries = $wpdb->num_queries; |
|
| 2198 | ||
| 2199 | $q2 = new WP_Comment_Query( |
|
| 2200 | array( |
|
| 2201 | 'parent__in' => array( 4, 5, 6 ), |
|
| 2202 | ) |
|
| 2203 | ); |
|
| 2204 | ||
| @@ 2211-2225 (lines=15) @@ | ||
| 2208 | /** |
|
| 2209 | * @ticket 35677 |
|
| 2210 | */ |
|
| 2211 | public function test_cache_should_be_sensitive_to_parent__not_in() |
|
| 2212 | { |
|
| 2213 | global $wpdb; |
|
| 2214 | ||
| 2215 | $q1 = new WP_Comment_Query( |
|
| 2216 | array( |
|
| 2217 | 'parent__not_in' => array( 1, 2, 3 ), |
|
| 2218 | ) |
|
| 2219 | ); |
|
| 2220 | ||
| 2221 | $num_queries = $wpdb->num_queries; |
|
| 2222 | ||
| 2223 | $q2 = new WP_Comment_Query( |
|
| 2224 | array( |
|
| 2225 | 'parent__not_in' => array( 4, 5, 6 ), |
|
| 2226 | ) |
|
| 2227 | ); |
|
| 2228 | ||