Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/getUsers.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/getUsers.php
r38938 r40417 9 9 function test_invalid_username_password() { 10 10 $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'username', 'password' ) ); 11 $this->assertI nstanceOf( 'IXR_Error',$results );11 $this->assertIXRError( $results ); 12 12 $this->assertEquals( 403, $results->code ); 13 13 } … … 17 17 18 18 $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'subscriber', 'subscriber' ) ); 19 $this->assertI nstanceOf( 'IXR_Error',$results );19 $this->assertIXRError( $results ); 20 20 $this->assertEquals( 401, $results->code ); 21 21 } … … 25 25 26 26 $result = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator' ) ); 27 $this->assertNotI nstanceOf( 'IXR_Error',$result );27 $this->assertNotIXRError( $result ); 28 28 29 29 // check data types … … 50 50 $filter = array( 'role' => 'invalidrole' ); 51 51 $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) ); 52 $this->assertI nstanceOf( 'IXR_Error',$results );52 $this->assertIXRError( $results ); 53 53 $this->assertEquals( 403, $results->code ); 54 54 } … … 64 64 $filter = array( 'role' => 'editor' ); 65 65 $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) ); 66 $this->assertNotI nstanceOf( 'IXR_Error',$results );66 $this->assertNotIXRError( $results ); 67 67 $this->assertCount( 1, $results ); 68 68 $this->assertEquals( $editor_id, $results[0]['user_id'] ); … … 71 71 $filter2 = array( 'who' => 'authors' ); 72 72 $results2 = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter2 ) ); 73 $this->assertNotI nstanceOf( 'IXR_Error',$results2 );73 $this->assertNotIXRError( $results2 ); 74 74 $this->assertCount( 3, array_intersect( array( $author_id, $editor_id, $administrator_id ), wp_list_pluck( $results2, 'user_id' ) ) ); 75 75 } … … 105 105 $filter = array( 'orderby' => 'email', 'order' => 'ASC' ); 106 106 $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) ); 107 $this->assertNotI nstanceOf( 'IXR_Error',$results );107 $this->assertNotIXRError( $results ); 108 108 109 109 $last_email = '';
Note: See TracChangeset
for help on using the changeset viewer.