[wp-trac] [WordPress Trac] #35993: Unit tests: XML-RPC Request routines
WordPress Trac
noreply at wordpress.org
Tue Mar 8 14:58:50 UTC 2016
#35993: Unit tests: XML-RPC Request routines
-------------------------------------------------+-------------------------
Reporter: borgesbruno | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: XML-RPC | Release
Severity: normal | Version:
Keywords: has-patch has-unit-tests dev- | Resolution:
feedback | Focuses:
-------------------------------------------------+-------------------------
Comment (by redsweater):
I was curious about these methods because they didn't seem familiar even
after poking around in WordPress's XMLRPC support for many years. I
discovered their use is limited exclusively to the "Blogger" style methods
in class-wp-xmlrpc-server.php, specifically "blogger_newPost" and
"blogger_editPost".
It seems these are relics possibly from a time before WordPress had
formalized processing of the XMLRPC content of requests, parsing them into
key/value structs. The methods in question here use a crude regex parsing
to extract some key values from the submitted content.
As a code coverage goal for functions.php, it probably makes sense to add
tests for these methods. Longer term it seems like they shouldn't really
be in functions.php. They make more sense as a cohesive unit with other
Blogger API support in class-wp-xmlrpc-server.php. I am not suggesting
Blogger API support should be removed, but probably the code should be
colocated for easy management and eventual removal some day down the road.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35993#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list