Changeset 40417 for trunk/tests/phpunit/tests/xmlrpc/wp/deleteTerm.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/deleteTerm.php
r39189 r40417 15 15 function test_invalid_username_password() { 16 16 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'username', 'password', 'category', 0 ) ); 17 $this->assertI nstanceOf( 'IXR_Error',$result );17 $this->assertIXRError( $result ); 18 18 $this->assertEquals( 403, $result->code ); 19 19 } … … 23 23 24 24 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'subscriber', 'subscriber', '', 0 ) ); 25 $this->assertI nstanceOf( 'IXR_Error',$result );25 $this->assertIXRError( $result ); 26 26 $this->assertEquals( 403, $result->code ); 27 27 $this->assertEquals( __( 'Invalid taxonomy.' ), $result->message ); … … 32 32 33 33 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'not_existing', 0 ) ); 34 $this->assertI nstanceOf( 'IXR_Error',$result );34 $this->assertIXRError( $result ); 35 35 $this->assertEquals( 403, $result->code ); 36 36 $this->assertEquals( __( 'Invalid taxonomy.' ), $result->message ); … … 41 41 42 42 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'category', self::$term_id ) ); 43 $this->assertI nstanceOf( 'IXR_Error',$result );43 $this->assertIXRError( $result ); 44 44 $this->assertEquals( 401, $result->code ); 45 45 $this->assertEquals( __( 'Sorry, you are not allowed to delete this term.' ), $result->message ); … … 50 50 51 51 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'editor', 'editor', 'category', '' ) ); 52 $this->assertI nstanceOf( 'IXR_Error',$result );52 $this->assertIXRError( $result ); 53 53 $this->assertEquals( 500, $result->code ); 54 54 $this->assertEquals( __('Empty Term'), $result->message ); … … 59 59 60 60 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'editor', 'editor', 'category', 9999 ) ); 61 $this->assertI nstanceOf( 'IXR_Error',$result );61 $this->assertIXRError( $result ); 62 62 $this->assertEquals( 404, $result->code ); 63 63 $this->assertEquals( __( 'Invalid term ID.' ), $result->message ); … … 68 68 69 69 $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'editor', 'editor', 'category', self::$term_id ) ); 70 $this->assertNotI nstanceOf( 'IXR_Error',$result );70 $this->assertNotIXRError( $result ); 71 71 $this->assertInternalType( 'boolean', $result ); 72 72 }
Note: See TracChangeset
for help on using the changeset viewer.