- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase-rest-post-type-controller.php
r40108 r42343 160 160 if ( $links ) { 161 161 162 $links = test_rest_expand_compact_links( $links );162 $links = test_rest_expand_compact_links( $links ); 163 163 $post_type = get_post_type_object( $data['type'] ); 164 164 $this->assertEquals( $links['self'][0]['href'], rest_url( 'wp/v2/' . $post_type->rest_base . '/' . $data['id'] ) ); … … 217 217 foreach ( $links as &$links_array ) { 218 218 foreach ( $links_array as &$link ) { 219 $attributes = array_diff_key( $link, array( 'href' => 1, 'name' => 1 ) ); 220 $link = array_diff_key( $link, $attributes ); 219 $attributes = array_diff_key( 220 $link, array( 221 'href' => 1, 222 'name' => 1, 223 ) 224 ); 225 $link = array_diff_key( $link, $attributes ); 221 226 $link['attributes'] = $attributes; 222 227 } … … 279 284 280 285 protected function set_raw_post_data( $args = array() ) { 281 return wp_parse_args( $args, $this->set_post_data( array( 282 'title' => array( 283 'raw' => 'Post Title', 284 ), 285 'content' => array( 286 'raw' => 'Post content', 287 ), 288 'excerpt' => array( 289 'raw' => 'Post excerpt', 290 ), 291 ) ) ); 286 return wp_parse_args( 287 $args, $this->set_post_data( 288 array( 289 'title' => array( 290 'raw' => 'Post Title', 291 ), 292 'content' => array( 293 'raw' => 'Post content', 294 ), 295 'excerpt' => array( 296 'raw' => 'Post excerpt', 297 ), 298 ) 299 ) 300 ); 292 301 } 293 302
Note: See TracChangeset
for help on using the changeset viewer.