diff --git a/tests/phpunit/tests/option/siteOption.php b/tests/phpunit/tests/option/siteOption.php index d7dc1ce27a..8d76399d8c 100644 --- a/tests/phpunit/tests/option/siteOption.php +++ b/tests/phpunit/tests/option/siteOption.php @@ -137,7 +137,7 @@ class Tests_Option_SiteOption extends WP_UnitTestCase { delete_site_option( $key ); $this->assertTrue( update_site_option( $key, $value ) ); - wp_cache_flush(); // ensure we're getting the value from the DB + $this->flush_cache(); // ensure we're getting the value from the DB $this->assertEquals( $value, get_site_option( $key ) ); } diff --git a/tests/phpunit/tests/option/updateOption.php b/tests/phpunit/tests/option/updateOption.php index 4171a73f9f..8409281c90 100644 --- a/tests/phpunit/tests/option/updateOption.php +++ b/tests/phpunit/tests/option/updateOption.php @@ -25,9 +25,9 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { } global $wpdb; - wp_cache_flush(); + $this->flush_cache(); update_option( 'test_update_option_default', 'value' ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions(); @@ -49,9 +49,9 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { } global $wpdb; - wp_cache_flush(); + $this->flush_cache(); update_option( 'test_update_option_default', 'value', 'yes' ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions(); @@ -73,9 +73,9 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { } global $wpdb; - wp_cache_flush(); + $this->flush_cache(); update_option( 'test_update_option_default', 'value', 'no' ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which does not include autoload=no options. wp_load_alloptions(); @@ -98,9 +98,9 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { } global $wpdb; - wp_cache_flush(); + $this->flush_cache(); update_option( 'test_update_option_default', 'value', false ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which does not include autoload=no options. wp_load_alloptions(); @@ -127,7 +127,7 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { $updated = update_option( 'foo', 'bar2', true ); $this->assertTrue( $updated ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions(); @@ -152,7 +152,7 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { $updated = update_option( 'foo', 'bar', false ); $this->assertFalse( $updated ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions(); @@ -180,7 +180,7 @@ class Tests_Option_UpdateOption extends WP_UnitTestCase { $updated = update_option( 'foo', 'bar2' ); $this->assertTrue( $updated ); - wp_cache_flush(); + $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions();