Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/getTerm.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/getTerm.php
r39189 r40417 16 16 function test_invalid_username_password() { 17 17 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'username', 'password', 'category', 1 ) ); 18 $this->assertI nstanceOf( 'IXR_Error',$result );18 $this->assertIXRError( $result ); 19 19 $this->assertEquals( 403, $result->code ); 20 20 } … … 24 24 25 25 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', '', 0 ) ); 26 $this->assertI nstanceOf( 'IXR_Error',$result );26 $this->assertIXRError( $result ); 27 27 $this->assertEquals( 403, $result->code ); 28 28 $this->assertEquals( __( 'Invalid taxonomy.' ), $result->message ); … … 33 33 34 34 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'not_existing', 0 ) ); 35 $this->assertI nstanceOf( 'IXR_Error',$result );35 $this->assertIXRError( $result ); 36 36 $this->assertEquals( 403, $result->code ); 37 37 $this->assertEquals( __( 'Invalid taxonomy.' ), $result->message ); … … 42 42 43 43 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'subscriber', 'subscriber', 'category', self::$term_id ) ); 44 $this->assertI nstanceOf( 'IXR_Error',$result );44 $this->assertIXRError( $result ); 45 45 $this->assertEquals( 401, $result->code ); 46 46 $this->assertEquals( __( 'Sorry, you are not allowed to assign this term.' ), $result->message ); … … 52 52 53 53 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', '' ) ); 54 $this->assertI nstanceOf( 'IXR_Error',$result );54 $this->assertIXRError( $result ); 55 55 $this->assertEquals( 500, $result->code ); 56 56 $this->assertEquals( __('Empty Term'), $result->message ); … … 61 61 62 62 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', 9999 ) ); 63 $this->assertI nstanceOf( 'IXR_Error',$result );63 $this->assertIXRError( $result ); 64 64 $this->assertEquals( 404, $result->code ); 65 65 $this->assertEquals( __( 'Invalid term ID.' ), $result->message ); … … 73 73 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', self::$term_id ) ); 74 74 75 $this->assertNotI nstanceOf( 'IXR_Error',$result );75 $this->assertNotIXRError( $result ); 76 76 $this->assertEquals( $result, $term ); 77 77
Note: See TracChangeset
for help on using the changeset viewer.