WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 4 months ago

#37096 reviewing enhancement

Unit tests for xmlrpc_getposttitle() and xmlrpc_getpostcategory() along with patch to trim and unique returned values

Reported by: pbearne Owned by: desrosj
Milestone: Future Release Priority: low
Severity: minor Version: 0.71
Component: XML-RPC Keywords: has-patch has-unit-tests
Focuses: Cc:
PR Number:

Description

In tonight's Contrib 2 core we created this unit test for xmlrpc_getposttitle() function

Attachments (2)

xmlrpc-getposttitle.php.patch (3.6 KB) - added by pbearne 3 years ago.
Unit tests
xmlrpc_getpost.patch (9.1 KB) - added by pbearne 3 years ago.
functions.php and unit tests

Download all attachments as: .zip

Change History (8)

@pbearne
3 years ago

Unit tests

#1 @pbearne
3 years ago

these tests just show what is does today

It not very clever and doesn't handle bad data well

If you would nice to update this function but we aren't sure if it worth it

Please ask if you would the function to update

Paul

#2 @DrewAPicture
3 years ago

  • Keywords has-patch has-unit-tests added
  • Version changed from trunk to 0.71

#3 @pbearne
3 years ago

  • Summary changed from Unit tests for xmlrpc_getposttitle() to Unit tests for xmlrpc_getposttitle() and xmlrpc_getpostcategory() along with patch to trim and unique returned values

@pbearne
3 years ago

functions.php and unit tests

#4 @pbearne
3 years ago

Having looked at this a bit more we saw that these function can return values that are not trimmed.

So as well as adding unit tests for xmlrpc_getpostcategory() we have changed the functions to return trimmed values

#5 @desrosj
4 months ago

  • Milestone set to Future Release
  • Owner set to desrosj
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Status changed from new to reviewing

Hi @pbearne,

Sorry that this ticket fell through the cracks. I am assigning this to myself to review and evaluate.

#6 @pbearne
4 months ago

I had forgotten about this

If it needs a refresh just ask

Note: See TracTickets for help on using tickets.