Changeset 43851
- Timestamp:
- 10/31/2018 01:25:28 PM (6 years ago)
- Location:
- branches/5.0/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/tests/phpunit/tests/rest-api/rest-schema-setup.php
r43805 r43851 460 460 'Schema.routes./wp/v2/pages._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 461 461 'Schema.routes./wp/v2/media._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/media', 462 'Schema.routes./wp/v2/blocks._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/blocks', 462 463 'Schema.routes./wp/v2/types._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/types', 463 464 'Schema.routes./wp/v2/statuses._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/statuses', … … 468 469 'Schema.routes./wp/v2/users/me._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users/me', 469 470 'Schema.routes./wp/v2/comments._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/comments', 471 'Schema.routes./wp/v2/search._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/search', 470 472 'Schema.routes./wp/v2/settings._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/settings', 473 'Schema.routes./wp/v2/themes._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/themes', 471 474 'oembed.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0', 472 475 'oembed.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed', … … 485 488 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4', 486 489 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions', 487 'PostsCollection.0._links.predecessor-version.0.id' => 5,488 'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/ 5',490 'PostsCollection.0._links.predecessor-version.0.id' => 6, 491 'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/6', 489 492 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4', 490 493 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4', … … 494 497 'PostModel.link' => 'http://example.org/?p=4', 495 498 'postRevisions.0.author' => 2, 496 'postRevisions.0.id' => 5,499 'postRevisions.0.id' => 6, 497 500 'postRevisions.0.parent' => 4, 498 'postRevisions.0.slug' => '4- revision-v1',499 'postRevisions.0.guid.rendered' => 'http://example.org/?p= 5',501 'postRevisions.0.slug' => '4-autosave-v1', 502 'postRevisions.0.guid.rendered' => 'http://example.org/?p=6', 500 503 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 504 'postRevisions.1.author' => 2, 505 'postRevisions.1.id' => 5, 506 'postRevisions.1.parent' => 4, 507 'postRevisions.1.slug' => '4-revision-v1', 508 'postRevisions.1.guid.rendered' => 'http://example.org/?p=5', 509 'postRevisions.1._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 501 510 'revision.author' => 2, 502 511 'revision.id' => 5, … … 504 513 'revision.slug' => '4-revision-v1', 505 514 'revision.guid.rendered' => 'http://example.org/?p=5', 506 'PagesCollection.0.id' => 6, 507 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=6', 508 'PagesCollection.0.link' => 'http://example.org/?page_id=6', 509 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 515 'postAutosaves.0.author' => 2, 516 'postAutosaves.0.id' => 6, 517 'postAutosaves.0.parent' => 4, 518 'postAutosaves.0.slug' => '4-autosave-v1', 519 'postAutosaves.0.guid.rendered' => 'http://example.org/?p=6', 520 'postAutosaves.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 521 'autosave.author' => 2, 522 'autosave.id' => 6, 523 'autosave.parent' => 4, 524 'autosave.slug' => '4-autosave-v1', 525 'autosave.guid.rendered' => 'http://example.org/?p=6', 526 'PagesCollection.0.id' => 7, 527 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=7', 528 'PagesCollection.0.link' => 'http://example.org/?page_id=7', 529 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 510 530 'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 511 531 'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page', 512 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 6',513 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions',514 'PagesCollection.0._links.predecessor-version.0.id' => 7,515 'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions/7',516 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent= 6',517 'PageModel.id' => 6,518 'PageModel.guid.rendered' => 'http://example.org/?page_id= 6',519 'PageModel.link' => 'http://example.org/?page_id= 6',532 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7', 533 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions', 534 'PagesCollection.0._links.predecessor-version.0.id' => 9, 535 'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions/9', 536 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7', 537 'PageModel.id' => 7, 538 'PageModel.guid.rendered' => 'http://example.org/?page_id=7', 539 'PageModel.link' => 'http://example.org/?page_id=7', 520 540 'pageRevisions.0.author' => 2, 521 'pageRevisions.0.id' => 7, 522 'pageRevisions.0.parent' => 6, 523 'pageRevisions.0.slug' => '6-revision-v1', 524 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=7', 525 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 541 'pageRevisions.0.id' => 9, 542 'pageRevisions.0.parent' => 7, 543 'pageRevisions.0.slug' => '7-autosave-v1', 544 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=9', 545 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 546 'pageRevisions.1.author' => 2, 547 'pageRevisions.1.id' => 8, 548 'pageRevisions.1.parent' => 7, 549 'pageRevisions.1.slug' => '7-revision-v1', 550 'pageRevisions.1.guid.rendered' => 'http://example.org/?p=8', 551 'pageRevisions.1._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 526 552 'pageRevision.author' => 2, 527 'pageRevision.id' => 7, 528 'pageRevision.parent' => 6, 529 'pageRevision.slug' => '6-revision-v1', 530 'pageRevision.guid.rendered' => 'http://example.org/?p=7', 531 'MediaCollection.0.id' => 8, 532 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=8', 533 'MediaCollection.0.link' => 'http://example.org/?attachment_id=8', 553 'pageRevision.id' => 8, 554 'pageRevision.parent' => 7, 555 'pageRevision.slug' => '7-revision-v1', 556 'pageRevision.guid.rendered' => 'http://example.org/?p=8', 557 'pageAutosaves.0.author' => 2, 558 'pageAutosaves.0.id' => 9, 559 'pageAutosaves.0.parent' => 7, 560 'pageAutosaves.0.slug' => '7-autosave-v1', 561 'pageAutosaves.0.guid.rendered' => 'http://example.org/?p=9', 562 'pageAutosaves.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 563 'pageAutosave.author' => 2, 564 'pageAutosave.id' => 9, 565 'pageAutosave.parent' => 7, 566 'pageAutosave.slug' => '7-autosave-v1', 567 'pageAutosave.guid.rendered' => 'http://example.org/?p=9', 568 'MediaCollection.0.id' => 10, 569 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=10', 570 'MediaCollection.0.link' => 'http://example.org/?attachment_id=10', 534 571 'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 535 572 'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', 536 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/ 8',573 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/10', 537 574 'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 538 575 'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment', 539 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 8',540 'MediaModel.id' => 8,541 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id= 8',542 'MediaModel.link' => 'http://example.org/?attachment_id= 8',576 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10', 577 'MediaModel.id' => 10, 578 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=10', 579 'MediaModel.link' => 'http://example.org/?attachment_id=10', 543 580 'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 544 581 'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', … … 549 586 'TypesCollection.attachment._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 550 587 'TypesCollection.attachment._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 588 'TypesCollection.wp_block._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 589 'TypesCollection.wp_block._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/blocks', 551 590 'StatusesCollection.publish._links.archives.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 552 591 'StatusesCollection.future._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=future', … … 560 599 'TaxonomiesCollection.post_tag._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', 561 600 'CategoriesCollection.0.link' => 'http://example.org/?cat=1', 601 'CategoriesCollection.0.meta.test_single' => '', 602 'CategoriesCollection.0.meta.test_multi' => [], 603 'CategoriesCollection.0.meta.test_cat_single' => '', 604 'CategoriesCollection.0.meta.test_cat_multi' => [], 562 605 'CategoriesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories/1', 563 606 'CategoriesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories', … … 565 608 'CategoriesCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&categories=1', 566 609 'CategoryModel.link' => 'http://example.org/?cat=1', 610 'CategoryModel.meta.test_single' => '', 611 'CategoryModel.meta.test_multi' => [], 612 'CategoryModel.meta.test_cat_single' => '', 613 'CategoryModel.meta.test_cat_multi' => [], 567 614 'TagsCollection.0.id' => 2, 568 615 'TagsCollection.0.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 616 'TagsCollection.0.meta.test_single' => '', 617 'TagsCollection.0.meta.test_multi' => [], 618 'TagsCollection.0.meta.test_tag_meta' => '', 569 619 'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2', 570 620 'TagsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', … … 573 623 'TagModel.id' => 2, 574 624 'TagModel.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 625 'TagModel.meta.test_single' => '', 626 'TagModel.meta.test_multi' => [], 627 'TagModel.meta.test_tag_meta' => '', 575 628 'UsersCollection.0.link' => 'http://example.org/?author=1', 576 629 'UsersCollection.0.avatar_urls.24' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=24&d=mm&r=g', -
branches/5.0/tests/qunit/fixtures/wp-api-generated.js
r43810 r43851 4973 4973 "predecessor-version": [ 4974 4974 { 4975 "id": 5,4976 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/ 5"4975 "id": 6, 4976 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/6" 4977 4977 } 4978 4978 ], … … 5050 5050 "date": "2017-02-14T00:00:00", 5051 5051 "date_gmt": "2017-02-14T00:00:00", 5052 "id": 6, 5053 "modified": "2017-02-14T00:00:00", 5054 "modified_gmt": "2017-02-14T00:00:00", 5055 "parent": 4, 5056 "slug": "4-autosave-v1", 5057 "guid": { 5058 "rendered": "http://example.org/?p=6" 5059 }, 5060 "title": { 5061 "rendered": "" 5062 }, 5063 "content": { 5064 "rendered": "<p>Autosave post content.</p>\n" 5065 }, 5066 "excerpt": { 5067 "rendered": "" 5068 }, 5069 "_links": { 5070 "parent": [ 5071 { 5072 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5073 } 5074 ] 5075 } 5076 }, 5077 { 5078 "author": 2, 5079 "date": "2017-02-14T00:00:00", 5080 "date_gmt": "2017-02-14T00:00:00", 5052 5081 "id": 5, 5053 5082 "modified": "2017-02-14T00:00:00", … … 5059 5088 }, 5060 5089 "title": { 5061 "rendered": " "5090 "rendered": "REST API Client Fixture: Post" 5062 5091 }, 5063 5092 "content": { 5064 "rendered": "<p> Autosavepost content.</p>\n"5093 "rendered": "<p>Updated post content.</p>\n" 5065 5094 }, 5066 5095 "excerpt": { 5067 "rendered": " "5096 "rendered": "<p>REST API Client Fixture: Post</p>\n" 5068 5097 }, 5069 5098 "_links": { … … 5071 5100 { 5072 5101 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5073 }5074 ]5075 }5076 },5077 {5078 "author": 406,5079 "date": "2017-02-14T00:00:00",5080 "date_gmt": "2017-02-14T00:00:00",5081 "id": 36717,5082 "modified": "2017-02-14T00:00:00",5083 "modified_gmt": "2017-02-14T00:00:00",5084 "parent": 36716,5085 "slug": "36716-revision-v1",5086 "guid": {5087 "rendered": "http://example.org/?p=36717"5088 },5089 "title": {5090 "rendered": "REST API Client Fixture: Post"5091 },5092 "content": {5093 "rendered": "<p>Updated post content.</p>\n"5094 },5095 "excerpt": {5096 "rendered": "<p>REST API Client Fixture: Post</p>\n"5097 },5098 "_links": {5099 "parent": [5100 {5101 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/36716"5102 5102 } 5103 5103 ] … … 5131 5131 mockedApiResponse.postAutosaves = [ 5132 5132 { 5133 "author": 406,5133 "author": 2, 5134 5134 "date": "2017-02-14T00:00:00", 5135 5135 "date_gmt": "2017-02-14T00:00:00", 5136 "id": 36718,5136 "id": 6, 5137 5137 "modified": "2017-02-14T00:00:00", 5138 5138 "modified_gmt": "2017-02-14T00:00:00", 5139 "parent": 36716,5140 "slug": " 36716-autosave-v1",5139 "parent": 4, 5140 "slug": "4-autosave-v1", 5141 5141 "guid": { 5142 "rendered": "http://example.org/?p= 36718"5142 "rendered": "http://example.org/?p=6" 5143 5143 }, 5144 5144 "title": { … … 5154 5154 "parent": [ 5155 5155 { 5156 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/ 36716"5156 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5157 5157 } 5158 5158 ] … … 5162 5162 5163 5163 mockedApiResponse.autosave = { 5164 "author": 406,5164 "author": 2, 5165 5165 "date": "2017-02-14T00:00:00", 5166 5166 "date_gmt": "2017-02-14T00:00:00", 5167 "id": 36718,5167 "id": 6, 5168 5168 "modified": "2017-02-14T00:00:00", 5169 5169 "modified_gmt": "2017-02-14T00:00:00", 5170 "parent": 36716,5171 "slug": " 36716-autosave-v1",5170 "parent": 4, 5171 "slug": "4-autosave-v1", 5172 5172 "guid": { 5173 "rendered": "http://example.org/?p= 36718"5173 "rendered": "http://example.org/?p=6" 5174 5174 }, 5175 5175 "title": { … … 5186 5186 mockedApiResponse.PagesCollection = [ 5187 5187 { 5188 "id": 6,5188 "id": 7, 5189 5189 "date": "2017-02-14T00:00:00", 5190 5190 "date_gmt": "2017-02-14T00:00:00", 5191 5191 "guid": { 5192 "rendered": "http://example.org/?page_id= 6"5192 "rendered": "http://example.org/?page_id=7" 5193 5193 }, 5194 5194 "modified": "2017-02-14T00:00:00", … … 5197 5197 "status": "publish", 5198 5198 "type": "page", 5199 "link": "http://example.org/?page_id= 6",5199 "link": "http://example.org/?page_id=7", 5200 5200 "title": { 5201 5201 "rendered": "REST API Client Fixture: Page" … … 5222 5222 "self": [ 5223 5223 { 5224 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6"5224 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5225 5225 } 5226 5226 ], … … 5238 5238 { 5239 5239 "embeddable": true, 5240 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 6"5240 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7" 5241 5241 } 5242 5242 ], … … 5244 5244 { 5245 5245 "count": 2, 5246 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions"5246 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions" 5247 5247 } 5248 5248 ], 5249 5249 "predecessor-version": [ 5250 5250 { 5251 "id": 7,5252 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions/7"5251 "id": 9, 5252 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions/9" 5253 5253 } 5254 5254 ], 5255 5255 "wp:attachment": [ 5256 5256 { 5257 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent= 6"5257 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7" 5258 5258 } 5259 5259 ], … … 5270 5270 5271 5271 mockedApiResponse.PageModel = { 5272 "id": 6,5272 "id": 7, 5273 5273 "date": "2017-02-14T00:00:00", 5274 5274 "date_gmt": "2017-02-14T00:00:00", 5275 5275 "guid": { 5276 "rendered": "http://example.org/?page_id= 6"5276 "rendered": "http://example.org/?page_id=7" 5277 5277 }, 5278 5278 "modified": "2017-02-14T00:00:00", … … 5281 5281 "status": "publish", 5282 5282 "type": "page", 5283 "link": "http://example.org/?page_id= 6",5283 "link": "http://example.org/?page_id=7", 5284 5284 "title": { 5285 5285 "rendered": "REST API Client Fixture: Page" … … 5310 5310 "date": "2017-02-14T00:00:00", 5311 5311 "date_gmt": "2017-02-14T00:00:00", 5312 "id": 7,5312 "id": 9, 5313 5313 "modified": "2017-02-14T00:00:00", 5314 5314 "modified_gmt": "2017-02-14T00:00:00", 5315 "parent": 6,5316 "slug": " 6-revision-v1",5315 "parent": 7, 5316 "slug": "7-autosave-v1", 5317 5317 "guid": { 5318 "rendered": "http://example.org/?p= 7"5318 "rendered": "http://example.org/?p=9" 5319 5319 }, 5320 5320 "title": { … … 5330 5330 "parent": [ 5331 5331 { 5332 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6"5332 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5333 5333 } 5334 5334 ] … … 5336 5336 }, 5337 5337 { 5338 "author": 406,5338 "author": 2, 5339 5339 "date": "2017-02-14T00:00:00", 5340 5340 "date_gmt": "2017-02-14T00:00:00", 5341 "id": 36720,5341 "id": 8, 5342 5342 "modified": "2017-02-14T00:00:00", 5343 5343 "modified_gmt": "2017-02-14T00:00:00", 5344 "parent": 36719,5345 "slug": " 36719-revision-v1",5344 "parent": 7, 5345 "slug": "7-revision-v1", 5346 5346 "guid": { 5347 "rendered": "http://example.org/?p= 36720"5347 "rendered": "http://example.org/?p=8" 5348 5348 }, 5349 5349 "title": { … … 5359 5359 "parent": [ 5360 5360 { 5361 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 36719"5361 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5362 5362 } 5363 5363 ] … … 5370 5370 "date": "2017-02-14T00:00:00", 5371 5371 "date_gmt": "2017-02-14T00:00:00", 5372 "id": 7,5372 "id": 8, 5373 5373 "modified": "2017-02-14T00:00:00", 5374 5374 "modified_gmt": "2017-02-14T00:00:00", 5375 "parent": 6,5376 "slug": " 6-revision-v1",5375 "parent": 7, 5376 "slug": "7-revision-v1", 5377 5377 "guid": { 5378 "rendered": "http://example.org/?p= 7"5378 "rendered": "http://example.org/?p=8" 5379 5379 }, 5380 5380 "title": { … … 5391 5391 mockedApiResponse.pageAutosaves = [ 5392 5392 { 5393 "author": 406,5393 "author": 2, 5394 5394 "date": "2017-02-14T00:00:00", 5395 5395 "date_gmt": "2017-02-14T00:00:00", 5396 "id": 36721,5396 "id": 9, 5397 5397 "modified": "2017-02-14T00:00:00", 5398 5398 "modified_gmt": "2017-02-14T00:00:00", 5399 "parent": 36719,5400 "slug": " 36719-autosave-v1",5399 "parent": 7, 5400 "slug": "7-autosave-v1", 5401 5401 "guid": { 5402 "rendered": "http://example.org/?p= 36721"5402 "rendered": "http://example.org/?p=9" 5403 5403 }, 5404 5404 "title": { … … 5414 5414 "parent": [ 5415 5415 { 5416 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 36719"5416 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5417 5417 } 5418 5418 ] … … 5422 5422 5423 5423 mockedApiResponse.pageAutosave = { 5424 "author": 406,5424 "author": 2, 5425 5425 "date": "2017-02-14T00:00:00", 5426 5426 "date_gmt": "2017-02-14T00:00:00", 5427 "id": 36721,5427 "id": 9, 5428 5428 "modified": "2017-02-14T00:00:00", 5429 5429 "modified_gmt": "2017-02-14T00:00:00", 5430 "parent": 36719,5431 "slug": " 36719-autosave-v1",5430 "parent": 7, 5431 "slug": "7-autosave-v1", 5432 5432 "guid": { 5433 "rendered": "http://example.org/?p= 36721"5433 "rendered": "http://example.org/?p=9" 5434 5434 }, 5435 5435 "title": { … … 5446 5446 mockedApiResponse.MediaCollection = [ 5447 5447 { 5448 "id": 8,5448 "id": 10, 5449 5449 "date": "2017-02-14T00:00:00", 5450 5450 "date_gmt": "2017-02-14T00:00:00", 5451 5451 "guid": { 5452 "rendered": "http://example.org/?attachment_id= 8"5452 "rendered": "http://example.org/?attachment_id=10" 5453 5453 }, 5454 5454 "modified": "2017-02-14T00:00:00", … … 5457 5457 "status": "inherit", 5458 5458 "type": "attachment", 5459 "link": "http://example.org/?attachment_id= 8",5459 "link": "http://example.org/?attachment_id=10", 5460 5460 "title": { 5461 5461 "rendered": "REST API Client Fixture: Attachment" … … 5483 5483 "self": [ 5484 5484 { 5485 "href": "http://example.org/index.php?rest_route=/wp/v2/media/ 8"5485 "href": "http://example.org/index.php?rest_route=/wp/v2/media/10" 5486 5486 } 5487 5487 ], … … 5499 5499 { 5500 5500 "embeddable": true, 5501 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 8"5501 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10" 5502 5502 } 5503 5503 ] … … 5507 5507 5508 5508 mockedApiResponse.MediaModel = { 5509 "id": 8,5509 "id": 10, 5510 5510 "date": "2017-02-14T00:00:00", 5511 5511 "date_gmt": "2017-02-14T00:00:00", 5512 5512 "guid": { 5513 "rendered": "http://example.org/?attachment_id= 8"5513 "rendered": "http://example.org/?attachment_id=10" 5514 5514 }, 5515 5515 "modified": "2017-02-14T00:00:00", … … 5518 5518 "status": "inherit", 5519 5519 "type": "attachment", 5520 "link": "http://example.org/?attachment_id= 8",5520 "link": "http://example.org/?attachment_id=10", 5521 5521 "title": { 5522 5522 "rendered": "REST API Client Fixture: Attachment"
Note: See TracChangeset
for help on using the changeset viewer.