mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
REST API: Update the test fixture generator following [43439]
As [43439] added data that contains object IDs, it can cause `wp-api-generated.js` to be unnecessarily regenerated. Regenerating our list of fixtures that need normalising rectifies this. See #44321. git-svn-id: https://develop.svn.wordpress.org/trunk@43441 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -441,66 +441,70 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
|
||||
'oembeds.author_name' => 'Test Blog',
|
||||
'oembeds.author_url' => 'http://example.org',
|
||||
'oembeds.html' => '<blockquote class="wp-embedded-content">...</blockquote>...',
|
||||
'PostsCollection.0.id' => 3,
|
||||
'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3',
|
||||
'PostsCollection.0.link' => 'http://example.org/?p=3',
|
||||
'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
|
||||
'PostsCollection.0.id' => 4,
|
||||
'PostsCollection.0.guid.rendered' => 'http://example.org/?p=4',
|
||||
'PostsCollection.0.link' => 'http://example.org/?p=4',
|
||||
'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4',
|
||||
'PostsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts',
|
||||
'PostsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/post',
|
||||
'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3',
|
||||
'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions',
|
||||
'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3',
|
||||
'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3',
|
||||
'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3',
|
||||
'PostModel.id' => 3,
|
||||
'PostModel.guid.rendered' => 'http://example.org/?p=3',
|
||||
'PostModel.link' => 'http://example.org/?p=3',
|
||||
'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4',
|
||||
'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions',
|
||||
'PostsCollection.0._links.predecessor-version.0.id' => 5,
|
||||
'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/5',
|
||||
'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4',
|
||||
'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4',
|
||||
'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4',
|
||||
'PostModel.id' => 4,
|
||||
'PostModel.guid.rendered' => 'http://example.org/?p=4',
|
||||
'PostModel.link' => 'http://example.org/?p=4',
|
||||
'postRevisions.0.author' => 2,
|
||||
'postRevisions.0.id' => 4,
|
||||
'postRevisions.0.parent' => 3,
|
||||
'postRevisions.0.slug' => '3-revision-v1',
|
||||
'postRevisions.0.guid.rendered' => 'http://example.org/?p=4',
|
||||
'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
|
||||
'postRevisions.0.id' => 5,
|
||||
'postRevisions.0.parent' => 4,
|
||||
'postRevisions.0.slug' => '4-revision-v1',
|
||||
'postRevisions.0.guid.rendered' => 'http://example.org/?p=5',
|
||||
'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4',
|
||||
'revision.author' => 2,
|
||||
'revision.id' => 4,
|
||||
'revision.parent' => 3,
|
||||
'revision.slug' => '3-revision-v1',
|
||||
'revision.guid.rendered' => 'http://example.org/?p=4',
|
||||
'PagesCollection.0.id' => 5,
|
||||
'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5',
|
||||
'PagesCollection.0.link' => 'http://example.org/?page_id=5',
|
||||
'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',
|
||||
'revision.id' => 5,
|
||||
'revision.parent' => 4,
|
||||
'revision.slug' => '4-revision-v1',
|
||||
'revision.guid.rendered' => 'http://example.org/?p=5',
|
||||
'PagesCollection.0.id' => 6,
|
||||
'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=6',
|
||||
'PagesCollection.0.link' => 'http://example.org/?page_id=6',
|
||||
'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6',
|
||||
'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages',
|
||||
'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page',
|
||||
'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5',
|
||||
'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions',
|
||||
'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5',
|
||||
'PageModel.id' => 5,
|
||||
'PageModel.guid.rendered' => 'http://example.org/?page_id=5',
|
||||
'PageModel.link' => 'http://example.org/?page_id=5',
|
||||
'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6',
|
||||
'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions',
|
||||
'PagesCollection.0._links.predecessor-version.0.id' => 7,
|
||||
'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions/7',
|
||||
'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6',
|
||||
'PageModel.id' => 6,
|
||||
'PageModel.guid.rendered' => 'http://example.org/?page_id=6',
|
||||
'PageModel.link' => 'http://example.org/?page_id=6',
|
||||
'pageRevisions.0.author' => 2,
|
||||
'pageRevisions.0.id' => 6,
|
||||
'pageRevisions.0.parent' => 5,
|
||||
'pageRevisions.0.slug' => '5-revision-v1',
|
||||
'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6',
|
||||
'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5',
|
||||
'pageRevisions.0.id' => 7,
|
||||
'pageRevisions.0.parent' => 6,
|
||||
'pageRevisions.0.slug' => '6-revision-v1',
|
||||
'pageRevisions.0.guid.rendered' => 'http://example.org/?p=7',
|
||||
'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6',
|
||||
'pageRevision.author' => 2,
|
||||
'pageRevision.id' => 6,
|
||||
'pageRevision.parent' => 5,
|
||||
'pageRevision.slug' => '5-revision-v1',
|
||||
'pageRevision.guid.rendered' => 'http://example.org/?p=6',
|
||||
'MediaCollection.0.id' => 7,
|
||||
'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7',
|
||||
'MediaCollection.0.link' => 'http://example.org/?attachment_id=7',
|
||||
'pageRevision.id' => 7,
|
||||
'pageRevision.parent' => 6,
|
||||
'pageRevision.slug' => '6-revision-v1',
|
||||
'pageRevision.guid.rendered' => 'http://example.org/?p=7',
|
||||
'MediaCollection.0.id' => 8,
|
||||
'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=8',
|
||||
'MediaCollection.0.link' => 'http://example.org/?attachment_id=8',
|
||||
'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',
|
||||
'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg',
|
||||
'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/7',
|
||||
'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/8',
|
||||
'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media',
|
||||
'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment',
|
||||
'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7',
|
||||
'MediaModel.id' => 7,
|
||||
'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7',
|
||||
'MediaModel.link' => 'http://example.org/?attachment_id=7',
|
||||
'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8',
|
||||
'MediaModel.id' => 8,
|
||||
'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=8',
|
||||
'MediaModel.link' => 'http://example.org/?attachment_id=8',
|
||||
'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>',
|
||||
'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg',
|
||||
'TypesCollection.post._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types',
|
||||
@@ -548,14 +552,14 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
|
||||
'me.id' => 2,
|
||||
'me.link' => 'http://example.org/?author=2',
|
||||
'CommentsCollection.0.id' => 2,
|
||||
'CommentsCollection.0.post' => 3,
|
||||
'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2',
|
||||
'CommentsCollection.0.post' => 4,
|
||||
'CommentsCollection.0.link' => 'http://example.org/?p=4#comment-2',
|
||||
'CommentsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments/2',
|
||||
'CommentsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments',
|
||||
'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3',
|
||||
'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4',
|
||||
'CommentModel.id' => 2,
|
||||
'CommentModel.post' => 3,
|
||||
'CommentModel.link' => 'http://example.org/?p=3#comment-2',
|
||||
'CommentModel.post' => 4,
|
||||
'CommentModel.link' => 'http://example.org/?p=4#comment-2',
|
||||
'settings.title' => 'Test Blog',
|
||||
'settings.url' => 'http://example.org',
|
||||
'settings.email' => 'admin@example.org',
|
||||
|
||||
Reference in New Issue
Block a user