Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/getComments.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/getComments.php
r35242 r40417 9 9 function test_invalid_username_password() { 10 10 $result = $this->myxmlrpcserver->wp_getComments( array( 1, 'username', 'password', array() ) ); 11 $this->assertI nstanceOf( 'IXR_Error',$result );11 $this->assertIXRError( $result ); 12 12 $this->assertEquals( 403, $result->code ); 13 13 } … … 17 17 18 18 $result = $this->myxmlrpcserver->wp_getComments( array( 1, 'contributor', 'contributor', array() ) ); 19 $this->assertI nstanceOf( 'IXR_Error',$result );19 $this->assertIXRError( $result ); 20 20 $this->assertEquals( 401, $result->code ); 21 21 } … … 28 28 29 29 $results = $this->myxmlrpcserver->wp_getComments( array( 1, 'editor', 'editor', array() ) ); 30 $this->assertNotI nstanceOf( 'IXR_Error',$results );30 $this->assertNotIXRError( $results ); 31 31 32 32 foreach( $results as $result ) { … … 45 45 'post_id' => $this->post_id 46 46 ) ) ); 47 $this->assertNotI nstanceOf( 'IXR_Error',$results );47 $this->assertNotIXRError( $results ); 48 48 49 49 foreach( $results as $result ) { … … 61 61 'post_id' => $this->post_id, 62 62 ) ) ); 63 $this->assertNotI nstanceOf( 'IXR_Error',$results );63 $this->assertNotIXRError( $results ); 64 64 65 65 // if no 'number' filter is specified, default should be 10 … … 70 70 'number' => 5 71 71 ) ) ); 72 $this->assertNotI nstanceOf( 'IXR_Error',$results2 );72 $this->assertNotIXRError( $results2 ); 73 73 $this->assertCount( 5, $results2 ); 74 74 } … … 105 105 106 106 $result = $this->myxmlrpcserver->wp_getComments( array( 1, 'contributor', 'contributor' ) ); 107 $this->assertI nstanceOf( 'IXR_Error',$result );107 $this->assertIXRError( $result ); 108 108 $this->assertEquals( 401, $result->code ); 109 109 } … … 141 141 'post_id' => $author_post_id 142 142 ) ) ); 143 $this->assertI nstanceOf( 'IXR_Error',$result1 );143 $this->assertIXRError( $result1 ); 144 144 145 145 $result2 = $this->myxmlrpcserver->wp_getComments( array( 1, 'author', 'author', array( … … 154 154 'post_id' => $editor_post_id 155 155 ) ) ); 156 $this->assertI nstanceOf( 'IXR_Error',$result3 );156 $this->assertIXRError( $result3 ); 157 157 158 158 $result4 = $this->myxmlrpcserver->wp_getComments( array( 1, 'author', 'author', array(
Note: See TracChangeset
for help on using the changeset viewer.