Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/getUser.php
- Timestamp:
- 04/12/2017 02:58:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getUser.php
r38938 r40417 26 26 function test_invalid_username_password() { 27 27 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'username', 'password', 1 ) ); 28 $this->assertI nstanceOf( 'IXR_Error',$result );28 $this->assertIXRError( $result ); 29 29 $this->assertEquals( 403, $result->code ); 30 30 } … … 32 32 function test_invalid_user() { 33 33 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', 34902348908234 ) ); 34 $this->assertI nstanceOf( 'IXR_Error',$result );34 $this->assertIXRError( $result ); 35 35 $this->assertEquals( 404, $result->code ); 36 36 } … … 41 41 42 42 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'subscriber', 'subscriber', $editor_id ) ); 43 $this->assertI nstanceOf( 'IXR_Error',$result );43 $this->assertIXRError( $result ); 44 44 $this->assertEquals( 401, $result->code ); 45 45 } … … 49 49 50 50 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'subscriber', 'subscriber', $subscriber_id ) ); 51 $this->assertNotI nstanceOf( 'IXR_Error',$result );51 $this->assertNotIXRError( $result ); 52 52 $this->assertEquals( $subscriber_id, $result['user_id'] ); 53 53 } … … 73 73 74 74 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $user_id ) ); 75 $this->assertNotI nstanceOf( 'IXR_Error',$result );75 $this->assertNotIXRError( $result ); 76 76 77 77 // check data types … … 112 112 113 113 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array() ) ); 114 $this->assertNotI nstanceOf( 'IXR_Error',$result );114 $this->assertNotIXRError( $result ); 115 115 $this->assertEquals( $editor_id, $result['user_id'] ); 116 116 … … 123 123 124 124 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array( 'basic' ) ) ); 125 $this->assertNotI nstanceOf( 'IXR_Error',$result );125 $this->assertNotIXRError( $result ); 126 126 $this->assertEquals( $editor_id, $result['user_id'] ); 127 127 … … 139 139 140 140 $result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, $fields ) ); 141 $this->assertNotI nstanceOf( 'IXR_Error',$result );141 $this->assertNotIXRError( $result ); 142 142 $this->assertEquals( $editor_id, $result['user_id'] ); 143 143
Note: See TracChangeset
for help on using the changeset viewer.