- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r41678 r42343 46 46 'code' => 200, 47 47 ), 48 'body' => wp_json_encode(48 'body' => wp_json_encode( 49 49 array( 50 50 'version' => '1.0', … … 131 131 // is not desirable. 132 132 133 $administrator_id = $this->factory->user->create( array( 134 'role' => 'administrator', 135 'display_name' => 'REST API Client Fixture: User', 136 'user_nicename' => 'restapiclientfixtureuser', 137 'user_email' => 'administrator@example.org', 138 ) ); 133 $administrator_id = $this->factory->user->create( 134 array( 135 'role' => 'administrator', 136 'display_name' => 'REST API Client Fixture: User', 137 'user_nicename' => 'restapiclientfixtureuser', 138 'user_email' => 'administrator@example.org', 139 ) 140 ); 139 141 wp_set_current_user( $administrator_id ); 140 142 141 $post_id = $this->factory->post->create( array( 142 'post_name' => 'restapi-client-fixture-post', 143 'post_title' => 'REST API Client Fixture: Post', 144 'post_content' => 'REST API Client Fixture: Post', 145 'post_excerpt' => 'REST API Client Fixture: Post', 146 'post_author' => 0, 147 ) ); 148 149 wp_update_post( array( 150 'ID' => $post_id, 151 'post_content' => 'Updated post content.', 152 ) ); 153 $post_revisions = array_values( wp_get_post_revisions( $post_id ) ); 143 $post_id = $this->factory->post->create( 144 array( 145 'post_name' => 'restapi-client-fixture-post', 146 'post_title' => 'REST API Client Fixture: Post', 147 'post_content' => 'REST API Client Fixture: Post', 148 'post_excerpt' => 'REST API Client Fixture: Post', 149 'post_author' => 0, 150 ) 151 ); 152 153 wp_update_post( 154 array( 155 'ID' => $post_id, 156 'post_content' => 'Updated post content.', 157 ) 158 ); 159 $post_revisions = array_values( wp_get_post_revisions( $post_id ) ); 154 160 $post_revision_id = $post_revisions[ count( $post_revisions ) - 1 ]->ID; 155 161 156 $page_id = $this->factory->post->create( array( 157 'post_type' => 'page', 158 'post_name' => 'restapi-client-fixture-page', 159 'post_title' => 'REST API Client Fixture: Page', 160 'post_content' => 'REST API Client Fixture: Page', 161 'post_excerpt' => 'REST API Client Fixture: Page', 162 'post_date' => '2017-02-14 00:00:00', 163 'post_date_gmt' => '2017-02-14 00:00:00', 164 'post_author' => 0, 165 ) ); 166 wp_update_post( array( 167 'ID' => $page_id, 168 'post_content' => 'Updated page content.', 169 ) ); 170 $page_revisions = array_values( wp_get_post_revisions( $page_id ) ); 162 $page_id = $this->factory->post->create( 163 array( 164 'post_type' => 'page', 165 'post_name' => 'restapi-client-fixture-page', 166 'post_title' => 'REST API Client Fixture: Page', 167 'post_content' => 'REST API Client Fixture: Page', 168 'post_excerpt' => 'REST API Client Fixture: Page', 169 'post_date' => '2017-02-14 00:00:00', 170 'post_date_gmt' => '2017-02-14 00:00:00', 171 'post_author' => 0, 172 ) 173 ); 174 wp_update_post( 175 array( 176 'ID' => $page_id, 177 'post_content' => 'Updated page content.', 178 ) 179 ); 180 $page_revisions = array_values( wp_get_post_revisions( $page_id ) ); 171 181 $page_revision_id = $page_revisions[ count( $page_revisions ) - 1 ]->ID; 172 182 173 $tag_id = $this->factory->tag->create( array( 174 'name' => 'REST API Client Fixture: Tag', 175 'slug' => 'restapi-client-fixture-tag', 176 'description' => 'REST API Client Fixture: Tag', 177 ) ); 178 179 $media_id = $this->factory->attachment->create_object( '/tmp/canola.jpg', 0, array( 180 'post_mime_type' => 'image/jpeg', 181 'post_excerpt' => 'A sample caption', 182 'post_name' => 'restapi-client-fixture-attachment', 183 'post_title' => 'REST API Client Fixture: Attachment', 184 'post_date' => '2017-02-14 00:00:00', 185 'post_date_gmt' => '2017-02-14 00:00:00', 186 'post_author' => 0, 187 ) ); 188 189 $comment_id = $this->factory->comment->create( array( 190 'comment_approved' => 1, 191 'comment_post_ID' => $post_id, 192 'user_id' => 0, 193 'comment_date' => '2017-02-14 00:00:00', 194 'comment_date_gmt' => '2017-02-14 00:00:00', 195 'comment_author' => 'Internet of something or other', 196 'comment_author_email' => 'lights@example.org', 197 'comment_author_url' => 'http://lights.example.org/', 198 ) ); 199 $meta_args = array( 183 $tag_id = $this->factory->tag->create( 184 array( 185 'name' => 'REST API Client Fixture: Tag', 186 'slug' => 'restapi-client-fixture-tag', 187 'description' => 'REST API Client Fixture: Tag', 188 ) 189 ); 190 191 $media_id = $this->factory->attachment->create_object( 192 '/tmp/canola.jpg', 0, array( 193 'post_mime_type' => 'image/jpeg', 194 'post_excerpt' => 'A sample caption', 195 'post_name' => 'restapi-client-fixture-attachment', 196 'post_title' => 'REST API Client Fixture: Attachment', 197 'post_date' => '2017-02-14 00:00:00', 198 'post_date_gmt' => '2017-02-14 00:00:00', 199 'post_author' => 0, 200 ) 201 ); 202 203 $comment_id = $this->factory->comment->create( 204 array( 205 'comment_approved' => 1, 206 'comment_post_ID' => $post_id, 207 'user_id' => 0, 208 'comment_date' => '2017-02-14 00:00:00', 209 'comment_date_gmt' => '2017-02-14 00:00:00', 210 'comment_author' => 'Internet of something or other', 211 'comment_author_email' => 'lights@example.org', 212 'comment_author_url' => 'http://lights.example.org/', 213 ) 214 ); 215 $meta_args = array( 200 216 'sanitize_callback' => 'sanitize_my_meta_key', 201 217 'auth_callback' => '__return_true', … … 265 281 ), 266 282 array( 267 'route' => '/wp/v2/pages/' . $page_id . '/revisions',283 'route' => '/wp/v2/pages/' . $page_id . '/revisions', 268 284 'name' => 'pageRevisions', 269 285 ), 270 286 array( 271 'route' => '/wp/v2/pages/' . $page_id . '/revisions/' . $page_revision_id,287 'route' => '/wp/v2/pages/' . $page_id . '/revisions/' . $page_revision_id, 272 288 'name' => 'pageRevision', 273 289 ), … … 346 362 ); 347 363 348 $mocked_responses = "/**\n";364 $mocked_responses = "/**\n"; 349 365 $mocked_responses .= " * DO NOT EDIT\n"; 350 366 $mocked_responses .= " * Auto-generated by test_build_wp_api_client_fixtures\n"; … … 359 375 } 360 376 $response = $this->server->dispatch( $request ); 361 $status = $response->get_status();362 $data = $response->get_data();377 $status = $response->get_status(); 378 $data = $response->get_data(); 363 379 364 380 $this->assertEquals( … … 370 386 371 387 if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) { 372 $fixture = $this->normalize_fixture( $data, $route['name'] );388 $fixture = $this->normalize_fixture( $data, $route['name'] ); 373 389 $mocked_responses .= "\nmockedApiResponse." . $route['name'] . ' = ' 374 390 . json_encode( $fixture, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) … … 398 414 */ 399 415 private static $fixture_replacements = array( 400 'Schema.name' => 'Test Blog',401 'Schema.url' => 'http://example.org',402 'Schema.home' => 'http://example.org',403 'Schema.routes./._links.self' => 'http://example.org/index.php?rest_route=/',404 'Schema.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0',405 'Schema.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed',406 'Schema.routes./oembed/1.0/proxy._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/proxy',407 'Schema.routes./wp/v2._links.self' => 'http://example.org/index.php?rest_route=/wp/v2',408 'Schema.routes./wp/v2/posts._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/posts',409 'Schema.routes./wp/v2/pages._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/pages',410 'Schema.routes./wp/v2/media._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/media',411 'Schema.routes./wp/v2/types._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/types',412 'Schema.routes./wp/v2/statuses._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/statuses',413 'Schema.routes./wp/v2/taxonomies._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies',414 'Schema.routes./wp/v2/categories._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/categories',415 'Schema.routes./wp/v2/tags._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/tags',416 'Schema.routes./wp/v2/users._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users',417 'Schema.routes./wp/v2/users/me._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users/me',418 'Schema.routes./wp/v2/comments._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/comments',419 'Schema.routes./wp/v2/settings._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/settings',420 'oembed.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0',421 'oembed.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed',422 'oembed.routes./oembed/1.0/proxy._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/proxy',423 'oembeds.provider_name' => 'Test Blog',424 'oembeds.provider_url' => 'http://example.org',425 'oembeds.author_name' => 'Test Blog',426 'oembeds.author_url' => 'http://example.org',427 'oembeds.html' => '<blockquote class="wp-embedded-content">...</blockquote>...',428 'PostsCollection.0.id' => 3,429 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3',430 'PostsCollection.0.link' => 'http://example.org/?p=3',431 'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',432 'PostsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts',433 'PostsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/post',434 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3',435 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions',436 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3',437 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3',438 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3',439 'PostModel.id' => 3,440 'PostModel.guid.rendered' => 'http://example.org/?p=3',441 'PostModel.link' => 'http://example.org/?p=3',442 'postRevisions.0.author' => 2,443 'postRevisions.0.id' => 4,444 'postRevisions.0.parent' => 3,445 'postRevisions.0.slug' => '3-revision-v1',446 'postRevisions.0.guid.rendered' => 'http://example.org/?p=4',447 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',448 'revision.author' => 2,449 'revision.id' => 4,450 'revision.parent' => 3,451 'revision.slug' => '3-revision-v1',452 'revision.guid.rendered' => 'http://example.org/?p=4',453 'PagesCollection.0.id' => 5,454 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5',455 'PagesCollection.0.link' => 'http://example.org/?page_id=5',456 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',457 'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages',458 'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page',459 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5',460 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions',461 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5',462 'PageModel.id' => 5,463 'PageModel.guid.rendered' => 'http://example.org/?page_id=5',464 'PageModel.link' => 'http://example.org/?page_id=5',465 'pageRevisions.0.author' => 2,466 'pageRevisions.0.id' => 6,467 'pageRevisions.0.parent' => 5,468 'pageRevisions.0.slug' => '5-revision-v1',469 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6',470 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',471 'pageRevision.author' => 2,472 'pageRevision.id' => 6,473 'pageRevision.parent' => 5,474 'pageRevision.slug' => '5-revision-v1',475 'pageRevision.guid.rendered' => 'http://example.org/?p=6',476 'MediaCollection.0.id' => 7,477 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7',478 'MediaCollection.0.link' => 'http://example.org/?attachment_id=7',479 'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',480 'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg',481 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/7',482 'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media',483 'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment',484 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7',485 'MediaModel.id' => 7,486 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7',487 'MediaModel.link' => 'http://example.org/?attachment_id=7',488 'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',489 'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg',490 'TypesCollection.post._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types',491 'TypesCollection.post._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts',492 'TypesCollection.page._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types',493 'TypesCollection.page._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages',416 'Schema.name' => 'Test Blog', 417 'Schema.url' => 'http://example.org', 418 'Schema.home' => 'http://example.org', 419 'Schema.routes./._links.self' => 'http://example.org/index.php?rest_route=/', 420 'Schema.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0', 421 'Schema.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed', 422 'Schema.routes./oembed/1.0/proxy._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/proxy', 423 'Schema.routes./wp/v2._links.self' => 'http://example.org/index.php?rest_route=/wp/v2', 424 'Schema.routes./wp/v2/posts._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 425 'Schema.routes./wp/v2/pages._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 426 'Schema.routes./wp/v2/media._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/media', 427 'Schema.routes./wp/v2/types._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/types', 428 'Schema.routes./wp/v2/statuses._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/statuses', 429 'Schema.routes./wp/v2/taxonomies._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies', 430 'Schema.routes./wp/v2/categories._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/categories', 431 'Schema.routes./wp/v2/tags._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/tags', 432 'Schema.routes./wp/v2/users._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users', 433 'Schema.routes./wp/v2/users/me._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users/me', 434 'Schema.routes./wp/v2/comments._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/comments', 435 'Schema.routes./wp/v2/settings._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/settings', 436 'oembed.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0', 437 'oembed.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed', 438 'oembed.routes./oembed/1.0/proxy._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/proxy', 439 'oembeds.provider_name' => 'Test Blog', 440 'oembeds.provider_url' => 'http://example.org', 441 'oembeds.author_name' => 'Test Blog', 442 'oembeds.author_url' => 'http://example.org', 443 'oembeds.html' => '<blockquote class="wp-embedded-content">...</blockquote>...', 444 'PostsCollection.0.id' => 3, 445 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3', 446 'PostsCollection.0.link' => 'http://example.org/?p=3', 447 'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', 448 'PostsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 449 'PostsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/post', 450 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3', 451 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions', 452 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3', 453 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3', 454 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3', 455 'PostModel.id' => 3, 456 'PostModel.guid.rendered' => 'http://example.org/?p=3', 457 'PostModel.link' => 'http://example.org/?p=3', 458 'postRevisions.0.author' => 2, 459 'postRevisions.0.id' => 4, 460 'postRevisions.0.parent' => 3, 461 'postRevisions.0.slug' => '3-revision-v1', 462 'postRevisions.0.guid.rendered' => 'http://example.org/?p=4', 463 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', 464 'revision.author' => 2, 465 'revision.id' => 4, 466 'revision.parent' => 3, 467 'revision.slug' => '3-revision-v1', 468 'revision.guid.rendered' => 'http://example.org/?p=4', 469 'PagesCollection.0.id' => 5, 470 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5', 471 'PagesCollection.0.link' => 'http://example.org/?page_id=5', 472 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5', 473 'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 474 'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page', 475 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5', 476 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions', 477 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5', 478 'PageModel.id' => 5, 479 'PageModel.guid.rendered' => 'http://example.org/?page_id=5', 480 'PageModel.link' => 'http://example.org/?page_id=5', 481 'pageRevisions.0.author' => 2, 482 'pageRevisions.0.id' => 6, 483 'pageRevisions.0.parent' => 5, 484 'pageRevisions.0.slug' => '5-revision-v1', 485 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6', 486 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5', 487 'pageRevision.author' => 2, 488 'pageRevision.id' => 6, 489 'pageRevision.parent' => 5, 490 'pageRevision.slug' => '5-revision-v1', 491 'pageRevision.guid.rendered' => 'http://example.org/?p=6', 492 'MediaCollection.0.id' => 7, 493 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7', 494 'MediaCollection.0.link' => 'http://example.org/?attachment_id=7', 495 'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 496 'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', 497 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/7', 498 'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 499 'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment', 500 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7', 501 'MediaModel.id' => 7, 502 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7', 503 'MediaModel.link' => 'http://example.org/?attachment_id=7', 504 'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 505 'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', 506 'TypesCollection.post._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 507 'TypesCollection.post._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 508 'TypesCollection.page._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 509 'TypesCollection.page._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 494 510 'TypesCollection.attachment._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 495 511 'TypesCollection.attachment._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 496 512 'StatusesCollection.publish._links.archives.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 497 513 'StatusesCollection.future._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=future', 498 'StatusesCollection.draft._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=draft',514 'StatusesCollection.draft._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=draft', 499 515 'StatusesCollection.pending._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=pending', 500 516 'StatusesCollection.private._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=private', 501 'StatusesCollection.trash._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=trash',517 'StatusesCollection.trash._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=trash', 502 518 'TaxonomiesCollection.category._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies', 503 519 'TaxonomiesCollection.category._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories', 504 520 'TaxonomiesCollection.post_tag._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies', 505 521 'TaxonomiesCollection.post_tag._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', 506 'CategoriesCollection.0.link' => 'http://example.org/?cat=1',507 'CategoriesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories/1',508 'CategoriesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories',509 'CategoriesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/category',522 'CategoriesCollection.0.link' => 'http://example.org/?cat=1', 523 'CategoriesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories/1', 524 'CategoriesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories', 525 'CategoriesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/category', 510 526 'CategoriesCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&categories=1', 511 'CategoryModel.link' => 'http://example.org/?cat=1',512 'TagsCollection.0.id' => 2,513 'TagsCollection.0.link' => 'http://example.org/?tag=restapi-client-fixture-tag',514 'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2',515 'TagsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags',516 'TagsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/post_tag',517 'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&tags=2',518 'TagModel.id' => 2,519 'TagModel.link' => 'http://example.org/?tag=restapi-client-fixture-tag',520 'UsersCollection.0.link' => 'http://example.org/?author=1',521 'UsersCollection.0.avatar_urls.24' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=24&d=mm&r=g',522 'UsersCollection.0.avatar_urls.48' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=48&d=mm&r=g',523 'UsersCollection.0.avatar_urls.96' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=96&d=mm&r=g',524 'UsersCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users/1',525 'UsersCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users',526 'UsersCollection.1.id' => 2,527 'UsersCollection.1.link' => 'http://example.org/?author=2',528 'UsersCollection.1._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users/2',529 'UsersCollection.1._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users',530 'UserModel.id' => 2,531 'UserModel.link' => 'http://example.org/?author=2',532 'me.id' => 2,533 'me.link' => 'http://example.org/?author=2',534 'CommentsCollection.0.id' => 2,535 'CommentsCollection.0.post' => 3,536 'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2',537 'CommentsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments/2',538 'CommentsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments',539 'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',540 'CommentModel.id' => 2,541 'CommentModel.post' => 3,542 'CommentModel.link' => 'http://example.org/?p=3#comment-2',543 'settings.title' => 'Test Blog',544 'settings.url' => 'http://example.org',545 'settings.email' => 'admin@example.org',527 'CategoryModel.link' => 'http://example.org/?cat=1', 528 'TagsCollection.0.id' => 2, 529 'TagsCollection.0.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 530 'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2', 531 'TagsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', 532 'TagsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/post_tag', 533 'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&tags=2', 534 'TagModel.id' => 2, 535 'TagModel.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 536 'UsersCollection.0.link' => 'http://example.org/?author=1', 537 'UsersCollection.0.avatar_urls.24' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=24&d=mm&r=g', 538 'UsersCollection.0.avatar_urls.48' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=48&d=mm&r=g', 539 'UsersCollection.0.avatar_urls.96' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=96&d=mm&r=g', 540 'UsersCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users/1', 541 'UsersCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users', 542 'UsersCollection.1.id' => 2, 543 'UsersCollection.1.link' => 'http://example.org/?author=2', 544 'UsersCollection.1._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users/2', 545 'UsersCollection.1._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users', 546 'UserModel.id' => 2, 547 'UserModel.link' => 'http://example.org/?author=2', 548 'me.id' => 2, 549 'me.link' => 'http://example.org/?author=2', 550 'CommentsCollection.0.id' => 2, 551 'CommentsCollection.0.post' => 3, 552 'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2', 553 'CommentsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments/2', 554 'CommentsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments', 555 'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', 556 'CommentModel.id' => 2, 557 'CommentModel.post' => 3, 558 'CommentModel.link' => 'http://example.org/?p=3#comment-2', 559 'settings.title' => 'Test Blog', 560 'settings.url' => 'http://example.org', 561 'settings.email' => 'admin@example.org', 546 562 ); 547 563
Note: See TracChangeset
for help on using the changeset viewer.