Make WordPress Core


Ignore:
Timestamp:
04/15/2024 12:21:00 PM (11 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].

Merges [57931] to the 5.9 branch.

Props peterwilsoncc, jorbin.
See #60865.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

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

    r52269 r57992  
    373373    public function test_wp_crop_image_url() {
    374374        $file = wp_crop_image(
    375             'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
     375            'https://s.w.org/screenshots/3.9/dashboard.png',
    376376            0,
    377377            0,
     
    381381            100,
    382382            false,
    383             DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
     383            DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png'
    384384        );
    385385
     
    416416    public function test_wp_crop_image_url_not_exist() {
    417417        $file = wp_crop_image(
    418             'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
     418            'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg',
    419419            0,
    420420            0,
Note: See TracChangeset for help on using the changeset viewer.