Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/newTerm.php
- Timestamp:
- 09/02/2020 12:35:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/newTerm.php
r46586 r48937 19 19 $result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'username', 'password', array() ) ); 20 20 $this->assertIXRError( $result ); 21 $this->assert Equals( 403, $result->code );21 $this->assertSame( 403, $result->code ); 22 22 } 23 23 … … 27 27 $result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'editor', 'editor', array( 'taxonomy' => '' ) ) ); 28 28 $this->assertIXRError( $result ); 29 $this->assert Equals( 403, $result->code );30 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );29 $this->assertSame( 403, $result->code ); 30 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 31 31 } 32 32 … … 36 36 $result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'editor', 'editor', array( 'taxonomy' => 'not_existing' ) ) ); 37 37 $this->assertIXRError( $result ); 38 $this->assert Equals( 403, $result->code );39 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );38 $this->assertSame( 403, $result->code ); 39 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 40 40 } 41 41 … … 45 45 $result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'subscriber', 'subscriber', array( 'taxonomy' => 'category' ) ) ); 46 46 $this->assertIXRError( $result ); 47 $this->assert Equals( 401, $result->code );48 $this->assert Equals( __( 'Sorry, you are not allowed to create terms in this taxonomy.' ), $result->message );47 $this->assertSame( 401, $result->code ); 48 $this->assertSame( __( 'Sorry, you are not allowed to create terms in this taxonomy.' ), $result->message ); 49 49 } 50 50 … … 64 64 ); 65 65 $this->assertIXRError( $result ); 66 $this->assert Equals( 403, $result->code );67 $this->assert Equals( __( 'The term name cannot be empty.' ), $result->message );66 $this->assertSame( 403, $result->code ); 67 $this->assertSame( __( 'The term name cannot be empty.' ), $result->message ); 68 68 } 69 69 … … 84 84 ); 85 85 $this->assertIXRError( $result ); 86 $this->assert Equals( 403, $result->code );87 $this->assert Equals( __( 'This taxonomy is not hierarchical.' ), $result->message );86 $this->assertSame( 403, $result->code ); 87 $this->assertSame( __( 'This taxonomy is not hierarchical.' ), $result->message ); 88 88 } 89 89 … … 104 104 ); 105 105 $this->assertIXRError( $result ); 106 $this->assert Equals( 500, $result->code );106 $this->assertSame( 500, $result->code ); 107 107 } 108 108 … … 123 123 ); 124 124 $this->assertIXRError( $result ); 125 $this->assert Equals( 403, $result->code );126 $this->assert Equals( __( 'Parent term does not exist.' ), $result->message );125 $this->assertSame( 403, $result->code ); 126 $this->assertSame( __( 'Parent term does not exist.' ), $result->message ); 127 127 } 128 128
Note: See TracChangeset
for help on using the changeset viewer.