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/editComment.php

    r38938 r40417  
    2323            'status' => 'hold'
    2424        ) ) );
    25         $this->assertNotInstanceOf( 'IXR_Error', $result );
     25        $this->assertNotIXRError( $result );
    2626        $this->assertTrue( $result );
    2727    }
     
    4343
    4444        $result = $this->myxmlrpcserver->wp_editComment( array( 1, 'author', 'author', $comment_id, array( 'status' => 'hold' ) ) );
    45         $this->assertInstanceOf( 'IXR_Error', $result );
     45        $this->assertIXRError( $result );
    4646        $this->assertEquals( 403, $result->code );
    4747        $this->assertEquals( __( 'Sorry, you are not allowed to moderate or edit this comment.' ), $result->message );
Note: See TracChangeset for help on using the changeset viewer.