#56664 closed defect (bug) (fixed)
Add unit test for non-existing block-styles registration
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | General | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description (last modified by )
Adds PHPUnit test for https://core.trac.wordpress.org/changeset/54155
Change History (12)
This ticket was mentioned in PR #3336 on WordPress/wordpress-develop by aristath.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Keywords reporter-feedback added
@aristath in which case we get result for generate_block_asset_handle( $metadata['name'], $field_name, $index )
?
Do we need the unit test for this changes?
#4
@
3 years ago
The issue was introduced in https://github.com/WordPress/wordpress-develop/commit/3381f05fa241daf172d6c1c893fd25959c3b0656#diff-8c99af92e4ec0fdb307ddd9b42be1e1ef1efe4a9f31287c23f346244dddd1ce9R227, where wp_normalize_path()
was added on line 227 a few days ago.
Do we need the unit test for this changes?
We should probably add one to prevent something like this from happening in the future. However, writing a test for this one will be a bit more complicated than the existing tests for this function. I'll work on it, but in the meantime, the lack of a future-proofing test should not be considered a blocker for this bugfix.
#5
@
3 years ago
Turns out, the test for this was simpler than I initially believed. Added the test 👍
#8
@
3 years ago
😂 Looks like this was just fixed a few minutes ago in https://core.trac.wordpress.org/changeset/54155
However, that patch does not include a unit-test. I'll change the subject of this ticket, remove the changes in blocks.php
from my patch and leave only the PHPUnit test as it should still be relevant with the patch that was pushed.
#9
@
3 years ago
- Description modified (diff)
- Severity changed from major to normal
- Summary changed from Blocks try to load non-existent block-styles on the frontend to Add unit test for non-existing block-styles registration
#10
@
3 years ago
- Keywords commit added
- Owner set to audrasjb
- Status changed from new to accepted
Self assigning for commit
.
3 years ago
#12
Committed in https://core.trac.wordpress.org/changeset/54472
Trac ticket: https://core.trac.wordpress.org/ticket/56664