From c8257d0821caea3be378e599db3201f9aa1a5737 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 9 Oct 2022 13:47:31 +0000 Subject: [PATCH] Tests: Remove unnecessary file copying in `WP_Customize_Manager` tests. This was added to avoid creating leftover image sub-sizes in the version-controlled `DIR_TESTDATA` directory. However, this does not appear to be necessary: * `WP_Customizer_Manager::import_theme_starter_content()` already [source:tags/6.0.2/src/wp-includes/class-wp-customize-manager.php?marks=1370-1374#L1367 makes a copy of the image] before sideloading, so the test was essentially working with a copy of a copy. * The images were only used in one test out of 70 and do not need to be copied for every single test. Upon further investigation, there is also no evidence that creating these copies actually resolved the reported issue: * `WP_UnitTest_Factory_For_Attachment::create_object()` inserts an attachment, but does not create image sub-sizes. * `media_handle_sideload()` does create image sub-sizes, but the file is already in the media library by that time, and sub-sizes are created in the `uploads` directory, not in the version-controlled `DIR_TESTDATA` directory. This commit removes ~140 redundant file copying operations when running the test suite. Follow-up to [39276], [39346], [39411], [40142]. See #55652. Built from https://develop.svn.wordpress.org/trunk@54424 git-svn-id: http://core.svn.wordpress.org/trunk@53983 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 8e23e3d6a2..ec6afcc67f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54423'; +$wp_version = '6.1-beta3-54424'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.