#59476 closed enhancement (fixed)
Tests: Add coverage for Patterns registry
| Reported by: | Bernhard Reiter | Owned by: | Bernhard Reiter |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.4 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
We do not currently seem to have any unit test coverage for the Patterns registry (WP_Block_Patterns_Registry). With Block Hooks logic recently added ([56649]), it would be good to add some unit tests to guard that behavior against regressions.
(This is going to be a test-only change, which I believe is still permitted after Feature Freeze.)
Change History (3)
This ticket was mentioned in PR #5299 on WordPress/wordpress-develop by @Bernhard Reiter.
3 years ago
#1
- Keywords has-patch has-unit-tests added
@Bernhard Reiter commented on PR #5299:
3 years ago
#3
Committed to Core in https://core.trac.wordpress.org/changeset/56733.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
WIP. Modelled after
tests/phpunit/tests/blocks/wpBlockTypeRegistry.php; still need to remove a few of those test cases and add ones for the pattern registry (which doesn't have any coverage yet?)The goal is to cover hooked block insertion (https://github.com/WordPress/wordpress-develop/pull/5261) in
get_registeredandget_all_registered.Trac ticket: https://core.trac.wordpress.org/ticket/59476