[wp-trac] [WordPress Trac] #59325: Block Themes: Test that `_build_block_template_result_from_file` injects `theme` attribute
WordPress Trac
noreply at wordpress.org
Wed Sep 13 12:03:29 UTC 2023
#59325: Block Themes: Test that `_build_block_template_result_from_file` injects
`theme` attribute
---------------------------------------------+-----------------------------
Reporter: Bernhard Reiter | Owner: Bernhard
| Reiter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4
Component: Themes | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-----------------------------
Changes (by Bernhard Reiter):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"56562" 56562]:
{{{
#!CommitTicketReference repository="" revision="56562"
Themes: Add test for `theme` atttibute in file-based block template.
While we already have unit test coverage for
`_inject_theme_attribute_in_block_template_content`, those tests only
verify that ''that'' function does what is supposed to do; there's however
no guarantee that `_build_block_template_result_from_file` uses that
function (or whatever other technique) to actually inject the theme
attribute.
This patch adds test coverage to verify that the theme attribute is
correctly injected by `_build_block_template_result_from_file`.
Props costdev, gziolo, mukesh27, spacedmonkey.
Fixes #59325. See #59313.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59325#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list