WordPress.org

Make WordPress Core

Ticket #45196: 45196.1.diff

File 45196.1.diff, 27.0 KB (added by danielbachhuber, 22 months ago)
  • tests/phpunit/tests/rest-api/rest-schema-setup.php

    diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php
    index fecef13500..ed8c638f70 100644
    a b class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    459459                'Schema.routes./wp/v2/posts._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/posts',
    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',
    464465                'Schema.routes./wp/v2/taxonomies._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies',
    class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    467468                'Schema.routes./wp/v2/users._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users',
    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',
    473476                'oembed.routes./oembed/1.0/proxy._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/proxy',
    class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    484487                'PostsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/post',
    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',
    491494                'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4',
    class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    493496                'PostModel.guid.rendered' => 'http://example.org/?p=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,
    503512                'revision.parent' => 4,
    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',
    545582                'TypesCollection.post._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types',
    class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    548585                'TypesCollection.page._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages',
    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',
    553592                'StatusesCollection.draft._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=draft',
    class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    559598                'TaxonomiesCollection.post_tag._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies',
    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',
    564607                'CategoriesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/category',
    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',
    571621                'TagsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/taxonomies/post_tag',
    572622                'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&tags=2',
    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',
    577630                'UsersCollection.0.avatar_urls.48' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=48&d=mm&r=g',
  • tests/qunit/fixtures/wp-api-generated.js

    diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js
    index d058ab0a75..092896b08d 100644
    a b mockedApiResponse.PostsCollection = [ 
    49724972            ],
    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            ],
    49794979            "wp:attachment": [
    mockedApiResponse.postRevisions = [ 
    50495049        "author": 2,
    50505050        "date": "2017-02-14T00:00:00",
    50515051        "date_gmt": "2017-02-14T00:00:00",
    5052         "id": 5,
     5052        "id": 6,
    50535053        "modified": "2017-02-14T00:00:00",
    50545054        "modified_gmt": "2017-02-14T00:00:00",
    50555055        "parent": 4,
    5056         "slug": "4-revision-v1",
     5056        "slug": "4-autosave-v1",
    50575057        "guid": {
    5058             "rendered": "http://example.org/?p=5"
     5058            "rendered": "http://example.org/?p=6"
    50595059        },
    50605060        "title": {
    50615061            "rendered": ""
    mockedApiResponse.postRevisions = [ 
    50755075        }
    50765076    },
    50775077    {
    5078         "author": 406,
     5078        "author": 2,
    50795079        "date": "2017-02-14T00:00:00",
    50805080        "date_gmt": "2017-02-14T00:00:00",
    5081         "id": 36717,
     5081        "id": 5,
    50825082        "modified": "2017-02-14T00:00:00",
    50835083        "modified_gmt": "2017-02-14T00:00:00",
    5084         "parent": 36716,
    5085         "slug": "36716-revision-v1",
     5084        "parent": 4,
     5085        "slug": "4-revision-v1",
    50865086        "guid": {
    5087             "rendered": "http://example.org/?p=36717"
     5087            "rendered": "http://example.org/?p=5"
    50885088        },
    50895089        "title": {
    50905090            "rendered": "REST API Client Fixture: Post"
    mockedApiResponse.postRevisions = [ 
    50985098        "_links": {
    50995099            "parent": [
    51005100                {
    5101                     "href": "http://example.org/index.php?rest_route=/wp/v2/posts/36716"
     5101                    "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4"
    51025102                }
    51035103            ]
    51045104        }
    mockedApiResponse.revision = { 
    51305130
    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": {
    51455145            "rendered": ""
    mockedApiResponse.postAutosaves = [ 
    51535153        "_links": {
    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            ]
    51595159        }
    mockedApiResponse.postAutosaves = [ 
    51615161];
    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": {
    51765176        "rendered": ""
    mockedApiResponse.autosave = { 
    51855185
    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",
    51955195        "modified_gmt": "2017-02-14T00:00:00",
    51965196        "slug": "restapi-client-fixture-page",
    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"
    52025202        },
    mockedApiResponse.PagesCollection = [ 
    52215221        "_links": {
    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            ],
    52275227            "collection": [
    mockedApiResponse.PagesCollection = [ 
    52375237            "replies": [
    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            ],
    52435243            "version-history": [
    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            ],
    52605260            "curies": [
    mockedApiResponse.PagesCollection = [ 
    52695269];
    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",
    52795279    "modified_gmt": "2017-02-14T00:00:00",
    52805280    "slug": "restapi-client-fixture-page",
    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"
    52865286    },
    mockedApiResponse.pageRevisions = [ 
    53095309        "author": 2,
    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": {
    53215321            "rendered": ""
    mockedApiResponse.pageRevisions = [ 
    53295329        "_links": {
    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            ]
    53355335        }
    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": {
    53505350            "rendered": "REST API Client Fixture: Page"
    mockedApiResponse.pageRevisions = [ 
    53585358        "_links": {
    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            ]
    53645364        }
    mockedApiResponse.pageRevision = { 
    53695369    "author": 2,
    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": {
    53815381        "rendered": "REST API Client Fixture: Page"
    mockedApiResponse.pageRevision = { 
    53905390
    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": {
    54055405            "rendered": ""
    mockedApiResponse.pageAutosaves = [ 
    54135413        "_links": {
    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            ]
    54195419        }
    mockedApiResponse.pageAutosaves = [ 
    54215421];
    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": {
    54365436        "rendered": ""
    mockedApiResponse.pageAutosave = { 
    54455445
    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",
    54555455        "modified_gmt": "2017-02-14T00:00:00",
    54565456        "slug": "restapi-client-fixture-attachment",
    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"
    54625462        },
    mockedApiResponse.MediaCollection = [ 
    54825482        "_links": {
    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            ],
    54885488            "collection": [
    mockedApiResponse.MediaCollection = [ 
    54985498            "replies": [
    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            ]
    55045504        }
    mockedApiResponse.MediaCollection = [ 
    55065506];
    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",
    55165516    "modified_gmt": "2017-02-14T00:00:00",
    55175517    "slug": "restapi-client-fixture-attachment",
    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"
    55235523    },