Make WordPress Core


Ignore:
Timestamp:
04/15/2024 12:27:18 PM (9 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.6 branch.

Props peterwilsoncc, jorbin.
See #60865.

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

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

    r49450 r57995  
    369369    public function test_wp_crop_image_url() {
    370370        $file = wp_crop_image(
    371             'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
     371            'https://s.w.org/screenshots/3.9/dashboard.png',
    372372            0,
    373373            0,
     
    377377            100,
    378378            false,
    379             DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
     379            DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png'
    380380        );
    381381
     
    412412    public function test_wp_crop_image_url_not_exist() {
    413413        $file = wp_crop_image(
    414             'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
     414            'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg',
    415415            0,
    416416            0,
Note: See TracChangeset for help on using the changeset viewer.