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

Patterns: Add test coverage for patterns registry #5299

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Sep 25, 2023

The goal is to cover hooked block insertion (#5261) in get_registered and get_all_registered.

Trac ticket: https://core.trac.wordpress.org/ticket/59476


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@ockham ockham self-assigned this Sep 25, 2023
@ockham ockham force-pushed the add/block-patterns-registry-test-coverage branch from 51c938a to 807399f Compare September 27, 2023 08:20
@ockham ockham marked this pull request as ready for review September 27, 2023 11:22
@ockham ockham requested a review from gziolo September 27, 2023 11:22
Prior to this changeset, we did not seem to have any unit test coverage for the Patterns registry (`WP_Block_Patterns_Registry`).

With Block Hooks logic recently added ([56649]), it is particularly advisable to add some unit tests to the `get_registered()` and `get_all_registered()` methods to guard hooked block insertion against regressions.

Fixes #59476.
@ockham ockham force-pushed the add/block-patterns-registry-test-coverage branch from b094215 to 7024087 Compare September 27, 2023 13:05
@ockham
Copy link
Contributor Author

ockham commented Sep 27, 2023

Committed to Core in https://core.trac.wordpress.org/changeset/56733.

@ockham ockham closed this Sep 27, 2023
@ockham ockham deleted the add/block-patterns-registry-test-coverage branch September 27, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant