#53257 closed enhancement (fixed)
Function `block_has_support` needs some unit tests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Function block_has_support
needs some unit tests
Change History (5)
This ticket was mentioned in PR #1280 on WordPress/wordpress-develop by ntsekouras.
4 years ago
#1
- Keywords has-patch has-unit-tests added
4 years ago
#2
What I wanted to verify though is if this is the expected behavior in the case we have declared supports for a key with an empty array. Should this return true as it does now?
You can file an issue to discuss it separately. It's an edge case that you don't see in a real life. I believe it should return false
but it's also could be considered wrong input data like providing a number.
#3
@
4 years ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 50955:
4 years ago
#4
Committed in https://core.trac.wordpress.org/changeset/50955.
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/53257
This PR just adds some unit tests for
block_has_support
function.What I wanted to verify though is if this is the expected behavior in the case we have declared
supports
for a key with anempty array
. Should this return true as it does now?Example test that passes with an empty array: