Changeset 48937 for trunk/tests/phpunit/tests/xmlrpc/wp/getTaxonomy.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/getTaxonomy.php
r46586 r48937 9 9 $result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'username', 'password', 'category' ) ); 10 10 $this->assertIXRError( $result ); 11 $this->assert Equals( 403, $result->code );11 $this->assertSame( 403, $result->code ); 12 12 } 13 13 … … 17 17 $result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'editor', 'editor', '' ) ); 18 18 $this->assertIXRError( $result ); 19 $this->assert Equals( 403, $result->code );20 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );19 $this->assertSame( 403, $result->code ); 20 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 21 21 } 22 22 … … 26 26 $result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'editor', 'editor', 'not_existing' ) ); 27 27 $this->assertIXRError( $result ); 28 $this->assert Equals( 403, $result->code );29 $this->assert Equals( __( 'Invalid taxonomy.' ), $result->message );28 $this->assertSame( 403, $result->code ); 29 $this->assertSame( __( 'Invalid taxonomy.' ), $result->message ); 30 30 } 31 31 … … 35 35 $result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'subscriber', 'subscriber', 'category' ) ); 36 36 $this->assertIXRError( $result ); 37 $this->assert Equals( 401, $result->code );38 $this->assert Equals( __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ), $result->message );37 $this->assertSame( 401, $result->code ); 38 $this->assertSame( __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ), $result->message ); 39 39 } 40 40 … … 52 52 $this->assertNotIXRError( $result ); 53 53 $taxonomy = get_taxonomy( 'category' ); 54 $this->assert Equals( 'category', $result['name'], 'name' );55 $this->assert Equals( true,$result['_builtin'], '_builtin' );56 $this->assert Equals( $taxonomy->show_ui, $result['show_ui'], 'show_ui' );57 $this->assert Equals( $taxonomy->public, $result['public'], 'public' );58 $this->assert Equals( $taxonomy->hierarchical, $result['hierarchical'], 'hierarchical' );59 $this->assert Equals( (array) $taxonomy->labels, $result['labels'], 'labels' );60 $this->assert Equals( (array) $taxonomy->cap, $result['cap'], 'capabilities' );61 $this->assert Equals( (array) $taxonomy->object_type, $result['object_type'], 'object_types' );54 $this->assertSame( 'category', $result['name'], 'name' ); 55 $this->assertTrue( $result['_builtin'], '_builtin' ); 56 $this->assertSame( $taxonomy->show_ui, $result['show_ui'], 'show_ui' ); 57 $this->assertSame( $taxonomy->public, $result['public'], 'public' ); 58 $this->assertSame( $taxonomy->hierarchical, $result['hierarchical'], 'hierarchical' ); 59 $this->assertSame( (array) $taxonomy->labels, $result['labels'], 'labels' ); 60 $this->assertSame( (array) $taxonomy->cap, $result['cap'], 'capabilities' ); 61 $this->assertSame( (array) $taxonomy->object_type, $result['object_type'], 'object_types' ); 62 62 } 63 63 }
Note: See TracChangeset
for help on using the changeset viewer.