Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/getTerm.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/getTerm.php
r47122 r48937 19 19 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'username', 'password', 'category', 1 ) ); 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_getTerm( array( 1, 'editor', 'editor', '', 0 ) ); 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_getTerm( array( 1, 'editor', 'editor', 'not_existing', 0 ) ); 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_getTerm( array( 1, 'subscriber', 'subscriber', 'category', self::$term_id ) ); 46 46 $this->assertIXRError( $result ); 47 $this->assert Equals( 401, $result->code );48 $this->assert Equals( __( 'Sorry, you are not allowed to assign this term.' ), $result->message );47 $this->assertSame( 401, $result->code ); 48 $this->assertSame( __( 'Sorry, you are not allowed to assign this term.' ), $result->message ); 49 49 } 50 50 … … 55 55 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', '' ) ); 56 56 $this->assertIXRError( $result ); 57 $this->assert Equals( 500, $result->code );58 $this->assert Equals( __( 'Empty Term.' ), $result->message );57 $this->assertSame( 500, $result->code ); 58 $this->assertSame( __( 'Empty Term.' ), $result->message ); 59 59 } 60 60 … … 64 64 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', 9999 ) ); 65 65 $this->assertIXRError( $result ); 66 $this->assert Equals( 404, $result->code );67 $this->assert Equals( __( 'Invalid term ID.' ), $result->message );66 $this->assertSame( 404, $result->code ); 67 $this->assertSame( __( 'Invalid term ID.' ), $result->message ); 68 68 } 69 69 … … 93 93 94 94 // Check data. 95 $this->assert Equals( 0, $result['count'] );96 $this->assert Equals( $term['name'], $result['name'] );97 $this->assert Equals( $term['slug'], $result['slug'] );98 $this->assert Equals( 'category', $result['taxonomy'] );99 $this->assert Equals( $term['description'], $result['description'] );95 $this->assertSame( 0, $result['count'] ); 96 $this->assertSame( $term['name'], $result['name'] ); 97 $this->assertSame( $term['slug'], $result['slug'] ); 98 $this->assertSame( 'category', $result['taxonomy'] ); 99 $this->assertSame( $term['description'], $result['description'] ); 100 100 } 101 101 … … 124 124 $this->assertInternalType( 'array', $result['custom_fields'] ); 125 125 $term_meta = get_term_meta( self::$term_id, '', true ); 126 $this->assert Equals( $term_meta['foo'][0], $result['custom_fields'][0]['value'] );126 $this->assertSame( $term_meta['foo'][0], $result['custom_fields'][0]['value'] ); 127 127 } 128 128 }
Note: See TracChangeset
for help on using the changeset viewer.