wordpress-develop/tests/phpunit/tests/rest-api
Sergey Biryukov d8f311800d Tests: Bring some consistency to mocking HTTP requests in unit tests.
Includes:
* Renaming the `$preempt` parameter to `$response` in the `pre_http_request` filter to better match the context used in callbacks (returning the original value if the conditions are not met rather than preempting the request).
* Synchronizing parameter names and types in various `pre_http_request` callbacks in unit tests.

Follow-up to [34509], [37907], [40628], [40629], [45667], [46175], [48242], [48462], [49904], [51021], [51973], [52146], [52382], [54043], [54968].

See #56793, #56792.

git-svn-id: https://develop.svn.wordpress.org/trunk@55029 602fd350-edb4-49c9-b593-d223f7449a82
2023-01-05 10:21:19 +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 App Passwords: Improve validation and sanitization of the application name. 2021-01-27 19:03:42 +00:00
rest-application-passwords-controller.php Docs: Align spelling with American English. 2022-10-21 21:10:29 +00:00
rest-attachments-controller.php Tests: Minimize file copying in WP_REST_Attachments_Controller tests. 2022-10-09 17:45:54 +00:00
rest-autosaves-controller.php Autosave/REST API: Block autosaving from overwriting changes when locked from editing. 2022-09-11 22:33:29 +00:00
rest-block-directory-controller.php Tests: Bring some consistency to mocking HTTP requests in unit tests. 2023-01-05 10:21:19 +00:00
rest-block-renderer-controller.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
rest-block-type-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-blocks-controller.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
rest-categories-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-comments-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-controller.php Code Modernization: Explicitly declare all properties created in set_up() methods of various test classes. 2022-08-27 12:30:08 +00:00
rest-global-styles-controller.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
rest-pages-controller.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
rest-pattern-directory-controller.php Tests: Bring some consistency to mocking HTTP requests in unit tests. 2023-01-05 10:21:19 +00:00
rest-plugins-controller.php Tests: Bring some consistency to mocking HTTP requests in unit tests. 2023-01-05 10:21:19 +00:00
rest-post-meta-fields.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-post-statuses-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-post-types-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-posts-controller.php Docs: Update various DocBlocks and inline comments per the documentation standards. 2022-11-17 18:13:47 +00:00
rest-request-validation.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
rest-request.php Build/Test Tools: Fix warnings from stdClass::__invoke() callback mocks in REST API tests. 2021-11-23 18:55:23 +00:00
rest-revisions-controller.php Code Modernization: Explicitly declare all properties created in set_up() methods of various test classes. 2022-08-27 12:30:08 +00:00
rest-schema-sanitization.php Tests: Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods. 2021-08-06 21:38:45 +00:00
rest-schema-setup.php Tests: Bring some consistency to mocking HTTP requests in unit tests. 2023-01-05 10:21:19 +00:00
rest-schema-validation.php Tests: Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods. 2021-08-06 21:38:45 +00:00
rest-search-controller.php REST API: Add support for searching resources by id. 2022-09-11 21:10:31 +00:00
rest-server.php Coding Standards: Fix indentation of multi-line chained method call in test_json_error_with_status(). 2022-11-30 16:33:48 +00:00
rest-settings-controller.php REST API: Add support for settings to specify their own additionalProperties. 2022-09-11 23:28:39 +00:00
rest-sidebars-controller.php Coding Standards: Fix spacing for incrementors and decrementors in various files. 2022-11-29 21:11:42 +00:00
rest-site-health-controller.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
rest-tags-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-taxonomies-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-term-meta-fields.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-test-controller.php REST API: Add text-field and textarea-field as available schema formats for string sanitization. 2021-10-15 02:03:38 +00:00
rest-themes-controller.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
rest-users-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-widget-types-controller.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:49:49 +00:00
rest-widgets-controller.php External Libraries: Update Requests library to version 2.0.0. 2022-12-15 21:30:26 +00:00
wpRestBlockPatternCategoriesController.php Tests: Correctly use the factory method. 2022-09-06 22:03:10 +00:00
wpRestBlockPatternsController.php Tests: Correctly use the factory method. 2022-09-06 22:03:10 +00:00
wpRestEditSiteExportController.php Tests: Explicitly mark empty REST API tests as not performing any assertions. 2022-09-01 22:54:19 +00:00
wpRestMenuItemsController.php Coding Standards: Fix spacing for incrementors and decrementors in various files. 2022-11-29 21:11:42 +00:00
wpRestMenuLocationsController.php Tests: Explicitly mark empty REST API tests as not performing any assertions. 2022-09-01 22:54:19 +00:00
wpRestMenusController.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
wpRestTemplatesController.php Tests: Replace some occurrences of assertEquals() with assertSame(). 2022-10-07 01:02:07 +00:00
wpRestUrlDetailsController.php Tests: Bring some consistency to mocking HTTP requests in unit tests. 2023-01-05 10:21:19 +00:00