Make WordPress Core


Ignore:
Timestamp:
04/05/2024 12:10:13 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use an image on WordPress.org CDN in external HTTP tests.

Due to some changes on the WP.com side to compress the requested images on the fly, the exact image size in the response could be different between platforms.

This commit aims to make the affected tests more reliable.

Follow-up to [139/tests], [31258], [34568], [47142], [57903], [57904], [57924].

Props peterwilsoncc, jorbin.
See #60865.

File:
1 edited

Legend:

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

    r57924 r57931  
    639639    public function test_wp_crop_image_with_url() {
    640640        $file = wp_crop_image(
    641             'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canola.jpg',
     641            'https://s.w.org/screenshots/3.9/dashboard.png',
    642642            0,
    643643            0,
     
    647647            100,
    648648            false,
    649             DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
     649            DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png'
    650650        );
    651651
     
    688688    public function test_wp_crop_image_should_fail_with_wp_error_object_if_url_does_not_exist() {
    689689        $file = wp_crop_image(
    690             'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canoladoesnotexist.jpg',
     690            'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg',
    691691            0,
    692692            0,
Note: See TracChangeset for help on using the changeset viewer.