Make WordPress Core

Changeset 41155


Ignore:
Timestamp:
07/26/2017 04:05:27 AM (8 years ago)
Author:
pento
Message:

REST API: Update the fixture data for wp-api.js tests.

[41139] changed how the REST API URL is generated, but included an incorrect version of wp-api-generated.js.

This updates the generator to create the correct wp-api-generated.js, and updates wp-api-generated.js`.

Repeat of [41154], in the 4.8 branch.
Fixes #40886.

Location:
branches/4.8/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8/tests/phpunit/tests/rest-api/rest-schema-setup.php

    r40629 r41155  
    383383        'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3',
    384384        'PostsCollection.0.link' => 'http://example.org/?p=3',
    385         'PostsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3',
    386         'PostsCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=3',
    387         'PostsCollection.0._links.version-history.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3/revisions',
    388         'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3',
    389         'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcategories&post=3',
    390         'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Ftags&post=3',
     385        'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
     386        'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3',
     387        'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions',
     388        'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3',
     389        'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3',
     390        'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3',
    391391        'PostModel.id' => 3,
    392392        'PostModel.guid.rendered' => 'http://example.org/?p=3',
     
    397397        'postRevisions.0.slug' => '3-revision-v1',
    398398        'postRevisions.0.guid.rendered' => 'http://example.org/?p=4',
    399         'postRevisions.0._links.parent.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3',
     399        'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
    400400        'revision.author' => 2,
    401401        'revision.id' => 4,
     
    406406        'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5',
    407407        'PagesCollection.0.link' => 'http://example.org/?page_id=5',
    408         'PagesCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5',
    409         'PagesCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=5',
    410         'PagesCollection.0._links.version-history.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5/revisions',
    411         'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5',
     408        'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',
     409        'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5',
     410        'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions',
     411        'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5',
    412412        'PageModel.id' => 5,
    413413        'PageModel.guid.rendered' => 'http://example.org/?page_id=5',
     
    418418        'pageRevisions.0.slug' => '5-revision-v1',
    419419        'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6',
    420         'pageRevisions.0._links.parent.0.href' => 'http://example.org/?rest_route=/wp/v2/pages/5',
     420        'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',
    421421        'pageRevision.author' => 2,
    422422        'pageRevision.id' => 6,
     
    427427        'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7',
    428428        'MediaCollection.0.link' => 'http://example.org/?attachment_id=7',
    429         'MediaCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/media/7',
    430         'MediaCollection.0._links.replies.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=7',
     429        'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/7',
     430        'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7',
    431431        'MediaModel.id' => 7,
    432432        'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7',
    433433        'MediaModel.link' => 'http://example.org/?attachment_id=7',
    434434        'TagsCollection.0.id' => 2,
    435         'TagsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/tags/2',
    436         'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/?rest_route=%2Fwp%2Fv2%2Fposts&tags=2',
     435        'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2',
     436        'TagsCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&tags=2',
    437437        'TagModel.id' => 2,
    438438        'UsersCollection.1.id' => 2,
    439439        'UsersCollection.1.link' => 'http://example.org/?author=2',
    440         'UsersCollection.1._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/users/2',
     440        'UsersCollection.1._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/users/2',
    441441        'UserModel.id' => 2,
    442442        'UserModel.link' => 'http://example.org/?author=2',
     
    446446        'CommentsCollection.0.post' => 3,
    447447        'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2',
    448         'CommentsCollection.0._links.self.0.href' => 'http://example.org/?rest_route=/wp/v2/comments/2',
    449         'CommentsCollection.0._links.up.0.href' => 'http://example.org/?rest_route=/wp/v2/posts/3',
     448        'CommentsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments/2',
     449        'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
    450450        'CommentModel.id' => 2,
    451451        'CommentModel.post' => 3,
  • branches/4.8/tests/qunit/fixtures/wp-api-generated.js

    r41140 r41155  
    35693569            "self": [
    35703570                {
    3571                     "href": "http://example.org/?rest_route=/wp/v2/posts/3"
     3571                    "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3"
    35723572                }
    35733573            ],
     
    35853585                {
    35863586                    "embeddable": true,
    3587                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=3"
     3587                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3"
    35883588                }
    35893589            ],
    35903590            "version-history": [
    35913591                {
    3592                     "href": "http://example.org/?rest_route=/wp/v2/posts/3/revisions"
     3592                    "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions"
    35933593                }
    35943594            ],
    35953595            "wp:attachment": [
    35963596                {
    3597                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3"
     3597                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3"
    35983598                }
    35993599            ],
     
    36023602                    "taxonomy": "category",
    36033603                    "embeddable": true,
    3604                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcategories&post=3"
     3604                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3"
    36053605                },
    36063606                {
    36073607                    "taxonomy": "post_tag",
    36083608                    "embeddable": true,
    3609                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Ftags&post=3"
     3609                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3"
    36103610                }
    36113611            ],
     
    36843684            "parent": [
    36853685                {
    3686                     "href": "http://example.org/?rest_route=/wp/v2/posts/3"
     3686                    "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3"
    36873687                }
    36883688            ]
     
    37503750            "self": [
    37513751                {
    3752                     "href": "http://example.org/?rest_route=/wp/v2/pages/5"
     3752                    "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5"
    37533753                }
    37543754            ],
     
    37663766                {
    37673767                    "embeddable": true,
    3768                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=5"
     3768                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5"
    37693769                }
    37703770            ],
    37713771            "version-history": [
    37723772                {
    3773                     "href": "http://example.org/?rest_route=/wp/v2/pages/5/revisions"
     3773                    "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions"
    37743774                }
    37753775            ],
    37763776            "wp:attachment": [
    37773777                {
    3778                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"
     3778                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"
    37793779                }
    37803780            ],
     
    38493849            "parent": [
    38503850                {
    3851                     "href": "http://example.org/?rest_route=/wp/v2/pages/5"
     3851                    "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5"
    38523852                }
    38533853            ]
     
    39163916            "self": [
    39173917                {
    3918                     "href": "http://example.org/?rest_route=/wp/v2/media/7"
     3918                    "href": "http://example.org/index.php?rest_route=/wp/v2/media/7"
    39193919                }
    39203920            ],
     
    39323932                {
    39333933                    "embeddable": true,
    3934                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"
     3934                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"
    39353935                }
    39363936            ]
     
    43014301            "self": [
    43024302                {
    4303                     "href": "http://example.org/?rest_route=/wp/v2/tags/2"
     4303                    "href": "http://example.org/index.php?rest_route=/wp/v2/tags/2"
    43044304                }
    43054305            ],
     
    43164316            "wp:post_type": [
    43174317                {
    4318                     "href": "http://example.org/?rest_route=%2Fwp%2Fv2%2Fposts&tags=2"
     4318                    "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&tags=2"
    43194319                }
    43204320            ],
     
    43844384            "self": [
    43854385                {
    4386                     "href": "http://example.org/?rest_route=/wp/v2/users/2"
     4386                    "href": "http://example.org/index.php?rest_route=/wp/v2/users/2"
    43874387                }
    43884388            ],
     
    44514451            "self": [
    44524452                {
    4453                     "href": "http://example.org/?rest_route=/wp/v2/comments/2"
     4453                    "href": "http://example.org/index.php?rest_route=/wp/v2/comments/2"
    44544454                }
    44554455            ],
     
    44634463                    "embeddable": true,
    44644464                    "post_type": "post",
    4465                     "href": "http://example.org/?rest_route=/wp/v2/posts/3"
     4465                    "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3"
    44664466                }
    44674467            ]
Note: See TracChangeset for help on using the changeset viewer.