[wp-trac] [WordPress Trac] #56807: Delete existing attachment subsizes after WP_Customize_Manager tests
WordPress Trac
noreply at wordpress.org
Wed Oct 12 00:56:30 UTC 2022
#56807: Delete existing attachment subsizes after WP_Customize_Manager tests
------------------------------+-----------------------------
Reporter: ironprogrammer | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => accepted
* milestone: Awaiting Review => 6.1
Comment:
Thanks for the ticket!
Replying to [ticket:56807 ironprogrammer]:
> In the test, `canola.jpg` is mocked as an **existing attachment**. When
the test invokes `WP_Customize_Manager::import_theme_starter_content()`,
existing attachments are passed directly to
`wp_generate_attachment_metadata()`, which does not make a copy of the
file, and `wp_create_image_subsizes()` creates the above referenced files
in the original image's location.
It looks like my assessment in [54424] was incorrect, and the file does in
fact need to be copied. I could not reproduce the leftover files when
running the tests on Windows, but can under WSL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56807#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list