Make WordPress Core


Ignore:
Timestamp:
04/07/2024 09:49:23 PM (3 years 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].

Merges [57931] to the 6.0 branch.

Props peterwilsoncc, jorbin.
See #60865.

Location:
branches/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/tests/phpunit/tests/image/functions.php

    r53292 r57942  
    393393        public function test_wp_crop_image_url() {
    394394                $file = wp_crop_image(
    395                         'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
     395                        'https://s.w.org/screenshots/3.9/dashboard.png',
    396396                        0,
    397397                        0,
    … …  
    401401                        100,
    402402                        false,
    403                         DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
     403                        DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png'
    404404                );
    405405
    … …  
    436436        public function test_wp_crop_image_url_not_exist() {
    437437                $file = wp_crop_image(
    438                         'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
     438                        'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg',
    439439                        0,
    440440                        0,
Note: See TracChangeset for help on using the changeset viewer.