WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/12/2020 09:18:38 PM (17 months ago)
Author:
azaozz
Message:

Media: Fix wp_image_file_matches_image_meta() to also match when the original image URL is used.

Also refreshes and fixes some of the unit tests for media, and replaces test-image-large.png with test-image-large.jpg which is larger to allow testing of original_image in the image meta.

Fixes #50628.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/functions.php

    r48341 r48454  
    346346            DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
    347347        );
     348
     349        if ( is_wp_error( $file ) && $file->get_error_code() === 'invalid_image' ) {
     350            $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() cannot access remote image.' );
     351        }
     352
    348353        $this->assertNotWPError( $file );
    349354        $this->assertFileExists( $file );
Note: See TracChangeset for help on using the changeset viewer.