diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php index fd93a0940b..d3805383a7 100644 --- a/tests/phpunit/tests/cache.php +++ b/tests/phpunit/tests/cache.php @@ -281,7 +281,13 @@ class Tests_Cache extends WP_UnitTestCase { wp_cache_init(); global $wp_object_cache; - $this->assertEquals( $wp_object_cache, $new_blank_cache_object ); + + if ( wp_using_ext_object_cache() ) { + // External caches will contain property values that contain non-matching resource IDs + $this->assertInstanceOf( 'WP_Object_Cache', $wp_object_cache ); + } else { + $this->assertEquals( $wp_object_cache, $new_blank_cache_object ); + } } function test_wp_cache_replace() {