Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/mw/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/mw/getPost.php
r39189 r40417 20 20 function test_invalid_username_password() { 21 21 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'username', 'password' ) ); 22 $this->assertI nstanceOf( 'IXR_Error',$result );22 $this->assertIXRError( $result ); 23 23 $this->assertEquals( 403, $result->code ); 24 24 } … … 28 28 29 29 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'subscriber', 'subscriber' ) ); 30 $this->assertI nstanceOf( 'IXR_Error',$result );30 $this->assertIXRError( $result ); 31 31 $this->assertEquals( 401, $result->code ); 32 32 } … … 37 37 function test_invalid_postid() { 38 38 $result = $this->myxmlrpcserver->mw_getPost( array( 9999, 'author', 'author' ) ); 39 $this->assertI nstanceOf( 'IXR_Error',$result );39 $this->assertIXRError( $result ); 40 40 $this->assertEquals( 404, $result->code ); 41 41 } … … 46 46 $fields = array( 'post' ); 47 47 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'author', 'author' ) ); 48 $this->assertNotI nstanceOf( 'IXR_Error',$result );48 $this->assertNotIXRError( $result ); 49 49 50 50 // Check data types … … 97 97 $fields = array( 'post' ); 98 98 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'author', 'author' ) ); 99 $this->assertNotI nstanceOf( 'IXR_Error',$result );99 $this->assertNotIXRError( $result ); 100 100 101 101 $this->assertInternalType( 'string', $result['wp_post_thumbnail'] ); … … 109 109 $fields = array( 'post' ); 110 110 $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'author', 'author' ) ); 111 $this->assertNotI nstanceOf( 'IXR_Error',$result );111 $this->assertNotIXRError( $result ); 112 112 113 113 $this->assertInstanceOf( 'IXR_Date', $result['dateCreated'] );
Note: See TracChangeset
for help on using the changeset viewer.