Make WordPress Core


Ignore:
Timestamp:
04/12/2017 02:58:33 PM (9 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/getMediaItem.php

    r39189 r40417  
    3939        function test_invalid_username_password() {
    4040                $result = $this->myxmlrpcserver->wp_getMediaItem( array( 1, 'username', 'password', 0 ) );
    41                 $this->assertInstanceOf( 'IXR_Error', $result );
     41                $this->assertIXRError( $result );
    4242                $this->assertEquals( 403, $result->code );
    4343        }
     
    4848                $fields = array( 'post' );
    4949                $result = $this->myxmlrpcserver->wp_getMediaItem( array( 1, 'author', 'author', $this->attachment_id, $fields ) );
    50                 $this->assertNotInstanceOf( 'IXR_Error', $result );
     50                $this->assertNotIXRError( $result );
    5151
    5252                // Check data types
Note: See TracChangeset for help on using the changeset viewer.