Changeset 54053
- Timestamp:
- 09/01/2022 05:04:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/site-health.php
r54047 r54053 363 363 * @ticket 56040 364 364 */ 365 public function test_object_cache_default_thresholds() { 366 $wp_site_health = new WP_Site_Health(); 365 public function test_object_cache_default_thresholds_non_multisite() { 366 $wp_site_health = new WP_Site_Health(); 367 368 // Set thresholds so high they should never be exceeded. 369 add_filter( 370 'site_status_persistent_object_cache_thresholds', 371 function() { 372 return array( 373 'alloptions_count' => PHP_INT_MAX, 374 'alloptions_bytes' => PHP_INT_MAX, 375 'comments_count' => PHP_INT_MAX, 376 'options_count' => PHP_INT_MAX, 377 'posts_count' => PHP_INT_MAX, 378 'terms_count' => PHP_INT_MAX, 379 'users_count' => PHP_INT_MAX, 380 ); 381 } 382 ); 367 383 368 384 $this->assertFalse( … … 388 404 public function test_object_cache_thresholds_check_can_be_bypassed() { 389 405 $wp_site_health = new WP_Site_Health(); 406 390 407 add_filter( 'site_status_should_suggest_persistent_object_cache', '__return_true' ); 391 392 408 $this->assertTrue( 409 $wp_site_health->should_suggest_persistent_object_cache() 410 ); 411 412 add_filter( 'site_status_should_suggest_persistent_object_cache', '__return_false', 11 ); 413 $this->assertFalse( 393 414 $wp_site_health->should_suggest_persistent_object_cache() 394 415 );
Note: See TracChangeset
for help on using the changeset viewer.