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
This commit is contained in:
Sergey Biryukov 2022-10-09 13:47:31 +00:00
parent cbe943d1d1
commit c8257d0821
1 changed files with 1 additions and 1 deletions

View File

@ -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.