wordpress-develop/tests/phpunit/tests/rest-api
Adam Silverstein 9781ffbca5 Revisions: return existing autosave after saving with unchanged data.
Correctly return the existing autosave when an unchanged autosave is saved, instead of returning an error.

Fix regressions after r55154 where an error and not the original autosave was returned when saving with unchanged data (for example, clicking the preview button repeatedly). Returning the autosave (ID) is the expected behavior for the endpoint.

Follow up to [55154]

Props Mamaduka, jeroenrotty, mrfoxtalbot.
Fixes #58739.



git-svn-id: https://develop.svn.wordpress.org/trunk@56163 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-07 17:51:11 +00:00
..
json_schema_test_suite REST API: Add support for the oneOf and anyOf keywords. 2020-10-20 18:22:39 +00:00
application-passwords.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-application-passwords-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-attachments-controller.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
rest-autosaves-controller.php Revisions: return existing autosave after saving with unchanged data. 2023-07-07 17:51:11 +00:00
rest-block-directory-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-block-renderer-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-block-type-controller.php Editor: Add selectors field to block type definition 2023-04-21 10:41:58 +00:00
rest-blocks-controller.php Editor: rename sync_status and move it to top level. 2023-07-07 07:27:53 +00:00
rest-categories-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-comments-controller.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
rest-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-global-styles-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-global-styles-revisions-controller.php REST API: updates test annotations for global styles revisions 2023-06-29 06:47:43 +00:00
rest-navigation-fallback-controller.php Editor: add navigation fallback. 2023-06-27 05:52:06 +00:00
rest-pages-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-pattern-directory-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-plugins-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-post-meta-fields.php REST API: Check post meta update authorization only when value is changed. 2023-06-27 17:24:44 +00:00
rest-post-statuses-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-post-types-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-posts-controller.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
rest-request-validation.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-request.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
rest-revisions-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-schema-sanitization.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-schema-setup.php REST API: add revisions endpoint for global styles. 2023-06-28 03:33:23 +00:00
rest-schema-validation.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-search-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-server.php REST API: Expose current $request object to cors_header filters in WP_REST_SERVER->serve_request(). 2023-06-28 17:37:52 +00:00
rest-settings-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-sidebars-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-site-health-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-tags-controller.php Tests: Use the function get_num_queries across all unit tests. 2023-05-11 10:05:51 +00:00
rest-taxonomies-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-term-meta-fields.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-test-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-themes-controller.php REST API: Indicate when a theme supports the Site editor in the Themes REST API response. 2023-06-20 22:15:57 +00:00
rest-users-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-widget-types-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
rest-widgets-controller.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestBlockPatternCategoriesController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestBlockPatternsController.php Editor: allow filtering block patterns by source. 2023-06-27 11:11:02 +00:00
wpRestEditSiteExportController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestMenuItemsController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestMenuLocationsController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestMenusController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00
wpRestTemplatesController.php REST API: ignore empty templates. 2023-06-27 05:34:12 +00:00
wpRestUrlDetailsController.php Tests: Second pass at merging file-level and class-level DocBlocks in various unit test files. 2023-03-03 14:42:42 +00:00