WordPress.org

Make WordPress Core

Changeset 43851


Ignore:
Timestamp:
10/31/2018 01:25:28 PM (13 months ago)
Author:
danielbachhuber
Message:

REST API: Regenerate fixure schema after introduction of new endpoints.

This fixture schema ensures wp-api-generated.js doesn't change when running tests in local dev environments.

Fixes #45196.

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  
    460460        'Schema.routes./wp/v2/pages._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/pages',
    461461        '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',
    462463        'Schema.routes./wp/v2/types._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/types',
    463464        'Schema.routes./wp/v2/statuses._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/statuses',
     
    468469        'Schema.routes./wp/v2/users/me._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users/me',
    469470        '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',
    470472        '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',
    471474        'oembed.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0',
    472475        'oembed.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed',
     
    485488        'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4',
    486489        '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',
    489492        'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4',
    490493        'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4',
     
    494497        'PostModel.link' => 'http://example.org/?p=4',
    495498        'postRevisions.0.author' => 2,
    496         'postRevisions.0.id' => 5,
     499        'postRevisions.0.id' => 6,
    497500        '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',
    500503        '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',
    501510        'revision.author' => 2,
    502511        'revision.id' => 5,
     
    504513        'revision.slug' => '4-revision-v1',
    505514        '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',
    510530        'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages',
    511531        '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',
    520540        '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',
    526552        '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',
    534571        'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',
    535572        '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',
    537574        'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media',
    538575        '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',
    543580        'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',
    544581        'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg',
     
    549586        'TypesCollection.attachment._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types',
    550587        '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',
    551590        'StatusesCollection.publish._links.archives.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts',
    552591        'StatusesCollection.future._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=future',
     
    560599        'TaxonomiesCollection.post_tag._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags',
    561600        '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' => [],
    562605        'CategoriesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories/1',
    563606        'CategoriesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories',
     
    565608        'CategoriesCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&categories=1',
    566609        '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' => [],
    567614        'TagsCollection.0.id' => 2,
    568615        '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' => '',
    569619        'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2',
    570620        'TagsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags',
     
    573623        'TagModel.id' => 2,
    574624        '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' => '',
    575628        'UsersCollection.0.link' => 'http://example.org/?author=1',
    576629        '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  
    49734973            "predecessor-version": [
    49744974                {
    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"
    49774977                }
    49784978            ],
     
    50505050        "date": "2017-02-14T00:00:00",
    50515051        "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",
    50525081        "id": 5,
    50535082        "modified": "2017-02-14T00:00:00",
     
    50595088        },
    50605089        "title": {
    5061             "rendered": ""
     5090            "rendered": "REST API Client Fixture: Post"
    50625091        },
    50635092        "content": {
    5064             "rendered": "<p>Autosave post content.</p>\n"
     5093            "rendered": "<p>Updated post content.</p>\n"
    50655094        },
    50665095        "excerpt": {
    5067             "rendered": ""
     5096            "rendered": "<p>REST API Client Fixture: Post</p>\n"
    50685097        },
    50695098        "_links": {
     
    50715100                {
    50725101                    "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"
    51025102                }
    51035103            ]
     
    51315131mockedApiResponse.postAutosaves = [
    51325132    {
    5133         "author": 406,
     5133        "author": 2,
    51345134        "date": "2017-02-14T00:00:00",
    51355135        "date_gmt": "2017-02-14T00:00:00",
    5136         "id": 36718,
     5136        "id": 6,
    51375137        "modified": "2017-02-14T00:00:00",
    51385138        "modified_gmt": "2017-02-14T00:00:00",
    5139         "parent": 36716,
    5140         "slug": "36716-autosave-v1",
     5139        "parent": 4,
     5140        "slug": "4-autosave-v1",
    51415141        "guid": {
    5142             "rendered": "http://example.org/?p=36718"
     5142            "rendered": "http://example.org/?p=6"
    51435143        },
    51445144        "title": {
     
    51545154            "parent": [
    51555155                {
    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"
    51575157                }
    51585158            ]
     
    51625162
    51635163mockedApiResponse.autosave = {
    5164     "author": 406,
     5164    "author": 2,
    51655165    "date": "2017-02-14T00:00:00",
    51665166    "date_gmt": "2017-02-14T00:00:00",
    5167     "id": 36718,
     5167    "id": 6,
    51685168    "modified": "2017-02-14T00:00:00",
    51695169    "modified_gmt": "2017-02-14T00:00:00",
    5170     "parent": 36716,
    5171     "slug": "36716-autosave-v1",
     5170    "parent": 4,
     5171    "slug": "4-autosave-v1",
    51725172    "guid": {
    5173         "rendered": "http://example.org/?p=36718"
     5173        "rendered": "http://example.org/?p=6"
    51745174    },
    51755175    "title": {
     
    51865186mockedApiResponse.PagesCollection = [
    51875187    {
    5188         "id": 6,
     5188        "id": 7,
    51895189        "date": "2017-02-14T00:00:00",
    51905190        "date_gmt": "2017-02-14T00:00:00",
    51915191        "guid": {
    5192             "rendered": "http://example.org/?page_id=6"
     5192            "rendered": "http://example.org/?page_id=7"
    51935193        },
    51945194        "modified": "2017-02-14T00:00:00",
     
    51975197        "status": "publish",
    51985198        "type": "page",
    5199         "link": "http://example.org/?page_id=6",
     5199        "link": "http://example.org/?page_id=7",
    52005200        "title": {
    52015201            "rendered": "REST API Client Fixture: Page"
     
    52225222            "self": [
    52235223                {
    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"
    52255225                }
    52265226            ],
     
    52385238                {
    52395239                    "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"
    52415241                }
    52425242            ],
     
    52445244                {
    52455245                    "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"
    52475247                }
    52485248            ],
    52495249            "predecessor-version": [
    52505250                {
    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"
    52535253                }
    52545254            ],
    52555255            "wp:attachment": [
    52565256                {
    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"
    52585258                }
    52595259            ],
     
    52705270
    52715271mockedApiResponse.PageModel = {
    5272     "id": 6,
     5272    "id": 7,
    52735273    "date": "2017-02-14T00:00:00",
    52745274    "date_gmt": "2017-02-14T00:00:00",
    52755275    "guid": {
    5276         "rendered": "http://example.org/?page_id=6"
     5276        "rendered": "http://example.org/?page_id=7"
    52775277    },
    52785278    "modified": "2017-02-14T00:00:00",
     
    52815281    "status": "publish",
    52825282    "type": "page",
    5283     "link": "http://example.org/?page_id=6",
     5283    "link": "http://example.org/?page_id=7",
    52845284    "title": {
    52855285        "rendered": "REST API Client Fixture: Page"
     
    53105310        "date": "2017-02-14T00:00:00",
    53115311        "date_gmt": "2017-02-14T00:00:00",
    5312         "id": 7,
     5312        "id": 9,
    53135313        "modified": "2017-02-14T00:00:00",
    53145314        "modified_gmt": "2017-02-14T00:00:00",
    5315         "parent": 6,
    5316         "slug": "6-revision-v1",
     5315        "parent": 7,
     5316        "slug": "7-autosave-v1",
    53175317        "guid": {
    5318             "rendered": "http://example.org/?p=7"
     5318            "rendered": "http://example.org/?p=9"
    53195319        },
    53205320        "title": {
     
    53305330            "parent": [
    53315331                {
    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"
    53335333                }
    53345334            ]
     
    53365336    },
    53375337    {
    5338         "author": 406,
     5338        "author": 2,
    53395339        "date": "2017-02-14T00:00:00",
    53405340        "date_gmt": "2017-02-14T00:00:00",
    5341         "id": 36720,
     5341        "id": 8,
    53425342        "modified": "2017-02-14T00:00:00",
    53435343        "modified_gmt": "2017-02-14T00:00:00",
    5344         "parent": 36719,
    5345         "slug": "36719-revision-v1",
     5344        "parent": 7,
     5345        "slug": "7-revision-v1",
    53465346        "guid": {
    5347             "rendered": "http://example.org/?p=36720"
     5347            "rendered": "http://example.org/?p=8"
    53485348        },
    53495349        "title": {
     
    53595359            "parent": [
    53605360                {
    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"
    53625362                }
    53635363            ]
     
    53705370    "date": "2017-02-14T00:00:00",
    53715371    "date_gmt": "2017-02-14T00:00:00",
    5372     "id": 7,
     5372    "id": 8,
    53735373    "modified": "2017-02-14T00:00:00",
    53745374    "modified_gmt": "2017-02-14T00:00:00",
    5375     "parent": 6,
    5376     "slug": "6-revision-v1",
     5375    "parent": 7,
     5376    "slug": "7-revision-v1",
    53775377    "guid": {
    5378         "rendered": "http://example.org/?p=7"
     5378        "rendered": "http://example.org/?p=8"
    53795379    },
    53805380    "title": {
     
    53915391mockedApiResponse.pageAutosaves = [
    53925392    {
    5393         "author": 406,
     5393        "author": 2,
    53945394        "date": "2017-02-14T00:00:00",
    53955395        "date_gmt": "2017-02-14T00:00:00",
    5396         "id": 36721,
     5396        "id": 9,
    53975397        "modified": "2017-02-14T00:00:00",
    53985398        "modified_gmt": "2017-02-14T00:00:00",
    5399         "parent": 36719,
    5400         "slug": "36719-autosave-v1",
     5399        "parent": 7,
     5400        "slug": "7-autosave-v1",
    54015401        "guid": {
    5402             "rendered": "http://example.org/?p=36721"
     5402            "rendered": "http://example.org/?p=9"
    54035403        },
    54045404        "title": {
     
    54145414            "parent": [
    54155415                {
    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"
    54175417                }
    54185418            ]
     
    54225422
    54235423mockedApiResponse.pageAutosave = {
    5424     "author": 406,
     5424    "author": 2,
    54255425    "date": "2017-02-14T00:00:00",
    54265426    "date_gmt": "2017-02-14T00:00:00",
    5427     "id": 36721,
     5427    "id": 9,
    54285428    "modified": "2017-02-14T00:00:00",
    54295429    "modified_gmt": "2017-02-14T00:00:00",
    5430     "parent": 36719,
    5431     "slug": "36719-autosave-v1",
     5430    "parent": 7,
     5431    "slug": "7-autosave-v1",
    54325432    "guid": {
    5433         "rendered": "http://example.org/?p=36721"
     5433        "rendered": "http://example.org/?p=9"
    54345434    },
    54355435    "title": {
     
    54465446mockedApiResponse.MediaCollection = [
    54475447    {
    5448         "id": 8,
     5448        "id": 10,
    54495449        "date": "2017-02-14T00:00:00",
    54505450        "date_gmt": "2017-02-14T00:00:00",
    54515451        "guid": {
    5452             "rendered": "http://example.org/?attachment_id=8"
     5452            "rendered": "http://example.org/?attachment_id=10"
    54535453        },
    54545454        "modified": "2017-02-14T00:00:00",
     
    54575457        "status": "inherit",
    54585458        "type": "attachment",
    5459         "link": "http://example.org/?attachment_id=8",
     5459        "link": "http://example.org/?attachment_id=10",
    54605460        "title": {
    54615461            "rendered": "REST API Client Fixture: Attachment"
     
    54835483            "self": [
    54845484                {
    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"
    54865486                }
    54875487            ],
     
    54995499                {
    55005500                    "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"
    55025502                }
    55035503            ]
     
    55075507
    55085508mockedApiResponse.MediaModel = {
    5509     "id": 8,
     5509    "id": 10,
    55105510    "date": "2017-02-14T00:00:00",
    55115511    "date_gmt": "2017-02-14T00:00:00",
    55125512    "guid": {
    5513         "rendered": "http://example.org/?attachment_id=8"
     5513        "rendered": "http://example.org/?attachment_id=10"
    55145514    },
    55155515    "modified": "2017-02-14T00:00:00",
     
    55185518    "status": "inherit",
    55195519    "type": "attachment",
    5520     "link": "http://example.org/?attachment_id=8",
     5520    "link": "http://example.org/?attachment_id=10",
    55215521    "title": {
    55225522        "rendered": "REST API Client Fixture: Attachment"
Note: See TracChangeset for help on using the changeset viewer.