Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/editTerm.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/editTerm.php
r46586 r48937 30 30 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'username', 'password', 'category', 1 ) ); 31 31 $this->assertIXRError( $result ); 32 $this->assert Equals( 403, $result->code );32 $this->assertSame( 403, $result->code ); 33 33 } 34 34 … … 38 38 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'subscriber', 'subscriber', '', array( 'taxonomy' => '' ) ) ); 39 39 $this->assertIXRError( $result ); 40 $this->assert Equals( 403, $result->code );41 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );40 $this->assertSame( 403, $result->code ); 41 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 42 42 } 43 43 … … 47 47 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'subscriber', 'subscriber', self::$parent_term, array( 'taxonomy' => 'not_existing' ) ) ); 48 48 $this->assertIXRError( $result ); 49 $this->assert Equals( 403, $result->code );50 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );49 $this->assertSame( 403, $result->code ); 50 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 51 51 } 52 52 … … 56 56 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'subscriber', 'subscriber', self::$parent_term, array( 'taxonomy' => 'category' ) ) ); 57 57 $this->assertIXRError( $result ); 58 $this->assert Equals( 401, $result->code );59 $this->assert Equals( __( 'Sorry, you are not allowed to edit this term.' ), $result->message );58 $this->assertSame( 401, $result->code ); 59 $this->assertSame( __( 'Sorry, you are not allowed to edit this term.' ), $result->message ); 60 60 } 61 61 … … 65 65 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'editor', 'editor', 9999, array( 'taxonomy' => 'category' ) ) ); 66 66 $this->assertIXRError( $result ); 67 $this->assert Equals( 404, $result->code );68 $this->assert Equals( __( 'Invalid term ID.' ), $result->message );67 $this->assertSame( 404, $result->code ); 68 $this->assertSame( __( 'Invalid term ID.' ), $result->message ); 69 69 } 70 70 … … 74 74 $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'editor', 'editor', '', array( 'taxonomy' => 'category' ) ) ); 75 75 $this->assertIXRError( $result ); 76 $this->assert Equals( 500, $result->code );77 $this->assert Equals( __( 'Empty Term.' ), $result->message );76 $this->assertSame( 500, $result->code ); 77 $this->assertSame( __( 'Empty Term.' ), $result->message ); 78 78 } 79 79 … … 94 94 ); 95 95 $this->assertIXRError( $result ); 96 $this->assert Equals( 403, $result->code );97 $this->assert Equals( __( 'The term name cannot be empty.' ), $result->message );96 $this->assertSame( 403, $result->code ); 97 $this->assertSame( __( 'The term name cannot be empty.' ), $result->message ); 98 98 } 99 99 … … 114 114 ); 115 115 $this->assertIXRError( $result ); 116 $this->assert Equals( 403, $result->code );117 $this->assert Equals( __( 'Cannot set parent term, taxonomy is not hierarchical.' ), $result->message );116 $this->assertSame( 403, $result->code ); 117 $this->assertSame( __( 'Cannot set parent term, taxonomy is not hierarchical.' ), $result->message ); 118 118 } 119 119 … … 179 179 ); 180 180 $this->assertIXRError( $result ); 181 $this->assert Equals( 500, $result->code );181 $this->assertSame( 500, $result->code ); 182 182 } 183 183 … … 199 199 ); 200 200 $this->assertIXRError( $result ); 201 $this->assert Equals( 403, $result->code );202 $this->assert Equals( __( 'Parent term does not exist.' ), $result->message );201 $this->assertSame( 403, $result->code ); 202 $this->assertSame( __( 'Parent term does not exist.' ), $result->message ); 203 203 } 204 204 … … 220 220 ); 221 221 $this->assertIXRError( $result ); 222 $this->assert Equals( 500, $result->code );223 $this->assert Equals( htmlspecialchars( sprintf( __( 'The slug “%s” is already in use by another term.' ), $parent_term->slug ) ), $result->message );222 $this->assertSame( 500, $result->code ); 223 $this->assertSame( htmlspecialchars( sprintf( __( 'The slug “%s” is already in use by another term.' ), $parent_term->slug ) ), $result->message ); 224 224 } 225 225
Note: See TracChangeset
for help on using the changeset viewer.