Changeset 40916 for trunk/tests/phpunit/tests/xmlrpc/wp/getTerm.php
- Timestamp:
- 06/18/2017 10:39:12 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/getTerm.php
r40417 r40916 70 70 71 71 $term = get_term( self::$term_id, 'category', ARRAY_A ); 72 $term['custom_fields'] = array(); 72 73 73 74 $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', self::$term_id ) ); … … 96 97 $this->assertEquals( $term['description'], $result['description'] ); 97 98 } 99 100 /** 101 * @ticket 35991 102 */ 103 public function test_get_term_meta() { 104 $this->make_user_by_role( 'editor' ); 105 106 // Add term meta to test wp.getTerm. 107 add_term_meta( self::$term_id, 'foo', 'bar' ); 108 109 $term = get_term( self::$term_id, 'category', ARRAY_A ); 110 111 $result = $this->myxmlrpcserver->wp_getTerm( array( 112 1, 113 'editor', 114 'editor', 115 'category', 116 self::$term_id, 117 ) ); 118 $this->assertNotIXRError( $result ); 119 120 $this->assertInternalType( 'array', $result['custom_fields'] ); 121 $term_meta = get_term_meta( self::$term_id, '', true ); 122 $this->assertEquals( $term_meta['foo'][0], $result['custom_fields'][0]['value'] ); 123 } 98 124 }
Note: See TracChangeset
for help on using the changeset viewer.