[wp-trac] [WordPress Trac] #28759: Cache API unit tests should verify public function, not WP_Object_Cache methods
WordPress Trac
noreply at wordpress.org
Sat Jul 5 20:03:52 UTC 2014
#28759: Cache API unit tests should verify public function, not WP_Object_Cache
methods
-------------------------+-----------------------------
Reporter: tollmanz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache API | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The public API for the WP object cache uses the global `wp_cache_*`
functions. Traditionally, these functions are mapped to a class,
`WP_Object_Cache`, that provides the logic for the cache through different
class methods. The public API is then a wrapper for these methods. I think
we should transition our unit tests to test the public API, especially as
this makes it easier to test 3rd party caches against these tests. 3rd
party object caches ''shouldn't'' be required to implement the
`WP_Object_Cache` methods; they should only be required to implement the
public functions.
Additionally, having these tests test the public API will help should we
ever decide to change the `WP_Object_Cache` internals.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28759>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list