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

    r39045 r40417  
    1414        ) ) );
    1515 
    16         $this->assertNotInstanceOf( 'IXR_Error', $result );
     16        $this->assertNotIXRError( $result );
    1717    }
    1818 
     
    2525        ) ) );
    2626 
    27         $this->assertInstanceOf( 'IXR_Error', $result );
     27        $this->assertIXRError( $result );
    2828        $this->assertEquals( 403, $result->code );
    2929    }
     
    4141        ) ) );
    4242
    43         $this->assertInstanceOf( 'IXR_Error', $result );
     43        $this->assertIXRError( $result );
    4444        $this->assertEquals( 403, $result->code );
    4545    }
     
    5555        // First time it's a valid comment
    5656        $result = $this->myxmlrpcserver->wp_newComment( $comment_args  );
    57         $this->assertNotInstanceOf( 'IXR_Error', $result );
     57        $this->assertNotIXRError( $result );
    5858
    5959        // Run second time for duplication error
    6060        $result = $this->myxmlrpcserver->wp_newComment( $comment_args );
    6161
    62         $this->assertInstanceOf( 'IXR_Error', $result );
     62        $this->assertIXRError( $result );
    6363        $this->assertEquals( 403, $result->code );
    6464    }
Note: See TracChangeset for help on using the changeset viewer.