WordPress.org

Make WordPress Core


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

    r39174 r40417  
    99    function test_invalid_username_password() {
    1010        $result = $this->myxmlrpcserver->wp_editProfile( array( 1, 'username', 'password', array() ) );
    11         $this->assertInstanceOf( 'IXR_Error', $result );
     11        $this->assertIXRError( $result );
    1212        $this->assertEquals( 403, $result->code );
    1313    }
     
    2626        );
    2727        $result = $this->myxmlrpcserver->wp_editProfile( array( 1, 'subscriber', 'subscriber', $new_data ) );
    28         $this->assertNotInstanceOf( 'IXR_Error', $result );
     28        $this->assertNotIXRError( $result );
    2929        $this->assertTrue( $result );
    3030
     
    4646
    4747        $result = $this->myxmlrpcserver->wp_editProfile( array( 1, 'author', 'author', $new_data ) );
    48         $this->assertNotInstanceOf( 'IXR_Error', $result );
     48        $this->assertNotIXRError( $result );
    4949        $this->assertTrue( $result );
    5050
     
    6161
    6262        $result = $this->myxmlrpcserver->wp_editProfile( array( 1, 'editor', 'editor', $new_data ) );
    63         $this->assertNotInstanceOf( 'IXR_Error', $result );
     63        $this->assertNotIXRError( $result );
    6464        $this->assertTrue( $result );
    6565
Note: See TracChangeset for help on using the changeset viewer.