Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global styles: update PHP unit tests #52819

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jul 21, 2023

What?

Hello!

This PR:

  1. removes tests that have been ported to Core already as part of WP 6.3
  2. adds tests for Behaviors: Extend Global Styles API to read/write behaviors config. #52370
  3. changes a private method to protected so it can be used in inherited classes

Why?

  1. The tests are in Core, no need to duplicate 6.3 functionality test coverage
  2. Adding tests for new functionality ("behaviors" in Behaviors: Extend Global Styles API to read/write behaviors config. #52370)
  3. Make life easier when inheriting class for new functionality

Testing Instructions

Tests should pass:

npm run test:unit:php

- removes tests that have been ported to Core already as part of WP 6.3
- Adds tests for #52370
- Changes a private method to protected so it can be used in inherited classes
@ramonjd ramonjd added [Type] Code Quality Issues or PRs that relate to code quality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core labels Jul 21, 2023
@ramonjd ramonjd self-assigned this Jul 21, 2023
@github-actions
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-global-styles-controller-6-4.php
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-global-styles-revisions-controller-6-4.php
❔ phpunit/class-gutenberg-rest-global-styles-revisions-controller-test.php

Copy link
Contributor

@cbravobernal cbravobernal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ramonjd for your help 🙇

@cbravobernal cbravobernal merged commit 8234de4 into trunk Jul 21, 2023
50 checks passed
@cbravobernal cbravobernal deleted the update/global-styles-php-unit-tests branch July 21, 2023 08:06
@github-actions github-actions bot added this to the Gutenberg 16.4 milestone Jul 21, 2023
ramonjd added a commit to ramonjd/wordpress-develop that referenced this pull request Sep 6, 2023
@ramonjd ramonjd removed the Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants