Make WordPress Core


Ignore:
Timestamp:
04/12/2017 02:58:33 PM (7 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/getPageList.php

    r39189 r40417  
    2121    function test_invalid_username_password() {
    2222        $result = $this->myxmlrpcserver->wp_getPageList( array( 1, 'username', 'password' ) );
    23         $this->assertInstanceOf( 'IXR_Error', $result );
     23        $this->assertIXRError( $result );
    2424        $this->assertEquals( 403, $result->code );
    2525    }
     
    2929
    3030        $result = $this->myxmlrpcserver->wp_getPageList( array( 1, 'contributor', 'contributor' ) );
    31         $this->assertInstanceOf( 'IXR_Error', $result );
     31        $this->assertIXRError( $result );
    3232        $this->assertEquals( 401, $result->code );
    3333    }
     
    3737
    3838        $results = $this->myxmlrpcserver->wp_getPageList( array( 1, 'editor', 'editor' ) );
    39         $this->assertNotInstanceOf( 'IXR_Error', $results );
     39        $this->assertNotIXRError( $results );
    4040
    4141        foreach( $results as $result ) {
Note: See TracChangeset for help on using the changeset viewer.