This ensures that not only the array values being compared are equal, but also that their type is the same.
Going forward, stricter type checking by using `assertSameSets()` or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.
Follow-up to [48939], [49925], [50157], [50959], [50960], [50995], [51079].
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51137 602fd350-edb4-49c9-b593-d223f7449a82
Prevent unit tests from making HTTP requests to wordpress.org. Specify URLs as https rather than http.
Follow up to [51107].
Props hellofromTonya.
Fixes#53278.
git-svn-id: https://develop.svn.wordpress.org/trunk@51136 602fd350-edb4-49c9-b593-d223f7449a82
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.
Follow-up to [48466], [50995], [51079].
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@51135 602fd350-edb4-49c9-b593-d223f7449a82
These warnings will still be visible in the browser console. The majority of the warnings are coming from jQuery UI, which is still waiting for a new update to be released that is jQuery >= 3.0 friendly.
This change makes the E2E test results more readable without having to tread through the large number of warnings.
Props isabel_brison.
Fixes#52860.
git-svn-id: https://develop.svn.wordpress.org/trunk@51130 602fd350-edb4-49c9-b593-d223f7449a82
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.
They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.
Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes#44314.
git-svn-id: https://develop.svn.wordpress.org/trunk@51129 602fd350-edb4-49c9-b593-d223f7449a82
In [51118], an attempt was made to add pagination limits. The added tests need to be updated to ensure that they pass with the new changes.
Reverts [51118].
See #50233.
git-svn-id: https://develop.svn.wordpress.org/trunk@51125 602fd350-edb4-49c9-b593-d223f7449a82
When an feed request is made to a non-existent page, surpress the notice.
Props dd32, SergeyBiryukov, mukesh27, hellofromTonya.
Fixes#52814.
git-svn-id: https://develop.svn.wordpress.org/trunk@51121 602fd350-edb4-49c9-b593-d223f7449a82
This version introduces support for the latest Emoji added in version Emoji 13.1, which includes “face in clouds”, “face exhaling”, and of course, “face with spiral eyes”.
A new corresponding folder has been pushed to WordPress.org in [dotorg:17419].
Rages deep within, ❤️🔥.
Props kraftbj., desrosj.
Fixes#52852.
git-svn-id: https://develop.svn.wordpress.org/trunk@51113 602fd350-edb4-49c9-b593-d223f7449a82
On a previous package update, this block's server-side code has been missed.
This was causing the block to not render properly.
Props Chouby, desrosj, mcsf.
Fixes#53309.
git-svn-id: https://develop.svn.wordpress.org/trunk@51105 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes:
- Fix inspector opening when clicking outside the widget areas
- Assume light theme when a transparent background is used
- Make Post blocks non editable inside Query block
- Rename QueryLoop to PostTemplate block
Props ntsekouras.
See #52991.
git-svn-id: https://develop.svn.wordpress.org/trunk@51101 602fd350-edb4-49c9-b593-d223f7449a82
Modifies `wp_install_defaults()` so that when you install a new WordPress site you
have block in your widget areas, not widgets.
Fixes#53324.
Props isabel_brison, hellofromtonya, andraganescu.
git-svn-id: https://develop.svn.wordpress.org/trunk@51088 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [50380], [50959], [50960], [50973], [50993], [51003], [51051], [51054].
See #52482.
git-svn-id: https://develop.svn.wordpress.org/trunk@51079 602fd350-edb4-49c9-b593-d223f7449a82
Removes the Meta and Nav Menu widgets from the set of widgets expected by the
test for get_default_block_editor_settings().
Follows [51067].
See #53301.
git-svn-id: https://develop.svn.wordpress.org/trunk@51069 602fd350-edb4-49c9-b593-d223f7449a82
Makes the `DELETE /wp/v2/widgets/:id?force=1` endpoint actually delete the
widget from the `"widget-$id_base"` option and not just remove it from
`'sidebars_widgets'`.
Fixes#53313.
Props TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@51059 602fd350-edb4-49c9-b593-d223f7449a82
In core, you can run `tests/gutenberg/run.js` script to run the Gutenberg e2e tests
against Core with the plugin being disabled. This test ensures that the integration
of the block editor with Core is working properly.
This commit updates the Gutenberg base branch to be used for the tests to be wp/trunk
which corresponds to the latest packages that are included in Core.
See #52991.
git-svn-id: https://develop.svn.wordpress.org/trunk@51052 602fd350-edb4-49c9-b593-d223f7449a82
Returns the test suite with the addition of defining a URL in the RSS widget within `WP_Test_REST_Widgets_Controller::test_get_items()` to work around an infinite loop in `WP_Widget_RSS` on PHP 8 if the URL is unset or empty.
Reverts [51020].
Props peterwilsoncc, TimothyBlynJacobs.
See #41683.
git-svn-id: https://develop.svn.wordpress.org/trunk@51029 602fd350-edb4-49c9-b593-d223f7449a82
Add `$status` parameter to `post_exists()` to allow developers to specify a post type, date and status to ensure they hit the `wp_posts` table's `type_status_date` index when determining if a post exists.
Props apokalyptik, boonebgorges, brettshumaker, DrewAPicture, MikeHansenMe, peterwilsoncc, whyisjake.
Fixes#34012.
git-svn-id: https://develop.svn.wordpress.org/trunk@51027 602fd350-edb4-49c9-b593-d223f7449a82
By default, a post most contain any of the requested terms to be included in the response. This commit adds a new `operator` property that can be set to `AND` to require a post to contain all of the requested terms.
For example, `/wp/v2/posts?tags[terms]=1,2,3&tags[operator]=AND` will return posts that have tags with the ids of 1, 2, and 3.
Props dlh, earnjam, Clorith, jnylen0, sebbb.
Fixes#41287.
git-svn-id: https://develop.svn.wordpress.org/trunk@51026 602fd350-edb4-49c9-b593-d223f7449a82
Add an endpoint for fetching block patterns from WordPress.org, and load the block patterns from this new API. Remove the block patterns that have already been moved to WordPress.org/patterns.
Props ryelle, iandunn, youknowriad, timothyblynjacobs.
Fixes#53246.
git-svn-id: https://develop.svn.wordpress.org/trunk@51021 602fd350-edb4-49c9-b593-d223f7449a82
This test suite is causing a loop in PHP8, remove tests to investigate.
Props SergeyBiryukov, desrosj.
See #41683.
git-svn-id: https://develop.svn.wordpress.org/trunk@51020 602fd350-edb4-49c9-b593-d223f7449a82
With this patch, users will be able to create custom block based templates
and assign them to specific pages/posts.
Themes can also opt-out of this feature
Props bernhard-reiter, carlomanf.
Fixes#53176.
git-svn-id: https://develop.svn.wordpress.org/trunk@51003 602fd350-edb4-49c9-b593-d223f7449a82
Moves the widgets block editor from Gutenberg into WordPress Core.
- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
@wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
editor control depending on wp_use_widgets_block_editor().
Fixes#51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.
git-svn-id: https://develop.svn.wordpress.org/trunk@50996 602fd350-edb4-49c9-b593-d223f7449a82
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.
Fixes#41683.
Props TimothyBlynJacobs, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726.
git-svn-id: https://develop.svn.wordpress.org/trunk@50995 602fd350-edb4-49c9-b593-d223f7449a82
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.
Fixes#41683.
Props TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@50993 602fd350-edb4-49c9-b593-d223f7449a82
The PHPUnit 7.5+ method `assertEqualsWithDelta()` was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.
This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the `IsEqual()` class alias declaration, no longer needed.
Follow-up to [48952].
Props jrf.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50986 602fd350-edb4-49c9-b593-d223f7449a82
Always test for newer class names first and fall back to the older.
This improves compatibility when running PHPUnit via a phar while there is also a Composer-installed version of PHPUnit on the system.
Props jrf.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50982 602fd350-edb4-49c9-b593-d223f7449a82
The npm packages in use were published a few hours ago, which include some changes to how we manage colors. This commit adds the corresponding PHP changes.
Props nosolosw.
See #53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@50977 602fd350-edb4-49c9-b593-d223f7449a82
This is the second piece of landing the theme.json processing in WordPress core.
It includes the mechanism that outputs the CSS styles of a theme.json file.
Props nosolosw, youknowriad.
See #53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@50973 602fd350-edb4-49c9-b593-d223f7449a82
* Add missing `@since` tags.
* Update some DocBlocks per the documentation standards.
* Rename test files and classes per the naming conventions.
* Fix some code alignment issues reported by WPCS.
Follow-up to [50959], [50960].
See #52991, #53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@50967 602fd350-edb4-49c9-b593-d223f7449a82
* Update the function DocBlock per the documentation standards.
* Move the unit tests to a more appropriate place.
* Rename and reorder the tests for consistency with `_wp_array_get()` tests.
Follow-up to [50958], [50962], [50964].
See #53175, #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50965 602fd350-edb4-49c9-b593-d223f7449a82
This reverts the changes to `id_base` from [50953] due to backward compatibility concerns, and instead focuses on the `id` and `class` attributes specifically.
With this change, any backslashes in the `id` or `class` attributes for a namespaced widget class are converted to underscores, making it easier to style the output or target the widget with JavaScript.
Follow-up to [50953].
Fixes#44098.
git-svn-id: https://develop.svn.wordpress.org/trunk@50961 602fd350-edb4-49c9-b593-d223f7449a82