Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40423 closed enhancement (fixed)

Introduce assertNotIXRError() for clearer XMLRPC test failure messages

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


$this->assertNotInstanceOf( 'IXR_Error', $result ) is used in many of the XMLRPC tests. Unfortunately this means that when an IXR_Error is returned, its error message isn't exposed.

For WP_Error handling we have the assertNotWPError() method which helpfully uses the error message in the failure message when a WP_Error is returned. The same pattern should be introduced for IXR errors.

Attachments (2)

40423.diff (853 bytes) - added by johnbillion 7 years ago.
40423.implementation.diff (109.5 KB) - added by johnbillion 7 years ago.

Download all attachments as: .zip

Change History (4)

7 years ago

#1 @johnbillion
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to johnbillion
  • Status changed from new to assigned

#2 @johnbillion
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40417:

Build/Test tools: Introduce and implement assertNotIXRError() and assertIXRError() assertion methods.

This aids in debugging XMLRPC tests which fail, by exposing the IXR_Error error message in the assertion failure message.

Fixes #40423

Note: See TracTickets for help on using tickets.