Make WordPress Core


Ignore:
Timestamp:
04/07/2024 09:39:14 PM (2 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.3 branch.

Props peterwilsoncc, jorbin.
See #60865.

Location:
branches/6.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.3

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

    r55935 r57939  
    624624        public function test_wp_crop_image_with_url() {
    625625                $file = wp_crop_image(
    626                         'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
     626                        'https://s.w.org/screenshots/3.9/dashboard.png',
    627627                        0,
    628628                        0,
     
    632632                        100,
    633633                        false,
    634                         DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg'
     634                        DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png'
    635635                );
    636636
     
    673673        public function test_wp_crop_image_should_fail_with_wp_error_object_if_url_does_not_exist() {
    674674                $file = wp_crop_image(
    675                         'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg',
     675                        'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg',
    676676                        0,
    677677                        0,
Note: See TracChangeset for help on using the changeset viewer.