Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/getPost.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/getPost.php
r35242 r40417 28 28 function test_invalid_username_password() { 29 29 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'username', 'password', 1 ) ); 30 $this->assertI nstanceOf( 'IXR_Error',$result );30 $this->assertIXRError( $result ); 31 31 $this->assertEquals( 403, $result->code ); 32 32 } … … 37 37 $fields = array( 'post', 'custom_fields' ); 38 38 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id, $fields ) ); 39 $this->assertNotI nstanceOf( 'IXR_Error',$result );39 $this->assertNotIXRError( $result ); 40 40 41 41 // Check data types … … 80 80 $fields = array(); 81 81 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id, $fields ) ); 82 $this->assertNotI nstanceOf( 'IXR_Error',$result );82 $this->assertNotIXRError( $result ); 83 83 84 84 // when no fields are requested, only the IDs should be returned … … 89 89 function test_default_fields() { 90 90 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id ) ); 91 $this->assertNotI nstanceOf( 'IXR_Error',$result );91 $this->assertNotIXRError( $result ); 92 92 93 93 $this->assertArrayHasKey( 'post_id', $result ); … … 100 100 $fields = array( 'post' ); 101 101 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id, $fields ) ); 102 $this->assertNotI nstanceOf( 'IXR_Error',$result );102 $this->assertNotIXRError( $result ); 103 103 104 104 $this->assertInstanceOf( 'IXR_Date', $result['post_date'] ); … … 131 131 132 132 $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'editor', 'editor', $child_page_id ) ); 133 $this->assertNotI nstanceOf( 'IXR_Error',$result );133 $this->assertNotIXRError( $result ); 134 134 135 135 $this->assertInternalType( 'string', $result['post_id'] );
Note: See TracChangeset
for help on using the changeset viewer.