Unit Tests: in `Tests_Cache::test_wp_cache_init()`, when `wp_using_ext_object_cache()`, just check that the global is an instance of `WP_Object_Cache`. External object cache instances of `WP_Object_Cache` will contain resources as props that will always have differing internal IDs, so strict comparison won't work.

See #31491.


git-svn-id: https://develop.svn.wordpress.org/trunk@34765 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-02 05:05:26 +00:00
parent 80e4265277
commit cae64c5e13
1 changed files with 7 additions and 1 deletions

View File

@ -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() {