#59476 closed enhancement (fixed)
Tests: Add coverage for Patterns registry
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
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.
18 months ago
#1
- Keywords has-patch has-unit-tests added
@Bernhard Reiter commented on PR #5299:
18 months ago
#3
Committed to Core in https://core.trac.wordpress.org/changeset/56733.
Note: See
TracTickets for help on using
tickets.
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_registered
andget_all_registered
.Trac ticket: https://core.trac.wordpress.org/ticket/59476