[wp-trac] [WordPress Trac] #31463: Avoid reaching inside the object cache object in tests
WordPress Trac
noreply at wordpress.org
Wed May 10 09:09:20 UTC 2023
#31463: Avoid reaching inside the object cache object in tests
---------------------------------------------+---------------------------
Reporter: rmccue | Owner: spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+---------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"55741" 55741]:
{{{
#!CommitTicketReference repository="" revision="55741"
Build/Test Tools: Call `wp_cache_flush_runtime` in WP_UnitTestCase.
In `WP_UnitTestCase::flush_cache` method, the properties of the global
`$wp_object_cache` object were manaully being reset to flush the cache.
The function `wp_cache_flush_runtime` was added in [52772] and is designed
to reset any class properties to default values. Using
`wp_cache_flush_runtime` improve compatibility with third party object
caches, as it allows developers to define their own
`wp_cache_flush_runtime` function.
Props rmccue, johnbillion, wonderboymusic, boonebgorges, voldemortensen,
dd32, DrewAPicture, tillkruess, spacedmonkey.
Fixes #31463.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31463#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list