diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php index d3805383a7..bc671ecd86 100644 --- a/tests/phpunit/tests/cache.php +++ b/tests/phpunit/tests/cache.php @@ -19,7 +19,9 @@ class Tests_Cache extends WP_UnitTestCase { } function &init_cache() { - $cache = new WP_Object_Cache(); + global $wp_object_cache; + $cache_class = get_class( $wp_object_cache ); + $cache = new $cache_class(); $cache->add_global_groups( array( 'global-cache-test', 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache' ) ); return $cache; }