Tests: Don't overwrite image metadata in a wp_calculate_image_srcset() test for zero width.

This was unnecessarily replacing the original image metadata with a scaled version, leading to a few leftover images with the `-scaled` suffix in the `wp-content/uploads` directory.

Follow-up to [35412].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@53465 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-06-04 18:03:56 +00:00
parent d67674512e
commit 80ca807a96

View File

@ -1829,9 +1829,8 @@ EOF;
* @requires function imagejpeg
*/
public function test_wp_calculate_image_srcset_no_width() {
$file = get_attached_file( self::$large_id );
$image_url = wp_get_attachment_image_url( self::$large_id, 'medium' );
$image_meta = wp_generate_attachment_metadata( self::$large_id, $file );
$image_meta = wp_get_attachment_metadata( self::$large_id );
$size_array = array( 0, 0 );